NCBI C++ ToolKit
process_scoped.hpp
Go to the documentation of this file.

Go to the SVN repository for this file.

1 /* $Id: process_scoped.hpp 73225 2016-06-24 14:55:25Z ucko $
2 * ===========================================================================
3 *
4 * PUBLIC DOMAIN NOTICE
5 * National Center for Biotechnology Information
6 *
7 * This software/database is a "United States Government Work" under the
8 * terms of the United States Copyright Act. It was written as part of
9 * the author's official duties as a United States Government employee and
10 * thus cannot be copyrighted. This software/database is freely available
11 * to the public for use. The National Library of Medicine and the U.S.
12 * Government have not placed any restriction on its use or reproduction.
13 *
14 * Although all reasonable efforts have been taken to ensure the accuracy
15 * and reliability of the software and data, the NLM and the U.S.
16 * Government do not and cannot warrant the performance or results that
17 * may be obtained by using this software or data. The NLM and the U.S.
18 * Government disclaim all warranties, express or implied, including
19 * warranties of performance, merchantability or fitness for any particular
20 * purpose.
21 *
22 * Please cite the author in any work or product based on this material.
23 *
24 * ===========================================================================
25 *
26 * Author:
27 *
28 * File Description:
29 *
30 * ===========================================================================
31 */
32 
33 #ifndef __process_scoped__hpp__
34 #define __process_scoped__hpp__
35 
36 // ============================================================================
38 // ============================================================================
39  : public CSeqEntryProcess
40 {
41 public:
42  // ------------------------------------------------------------------------
44  // ------------------------------------------------------------------------
46  {};
47 
48  // ------------------------------------------------------------------------
50  // ------------------------------------------------------------------------
51  {
52  };
53 
54  // ------------------------------------------------------------------------
56  const CArgs& args )
57  // ------------------------------------------------------------------------
58  {
60 
62  if ( m_objmgr ) {
63  if ( args["gbload"] ) {
65  }
66 #ifdef HAVE_NCBI_VDB
67  if ( args["wgsload"] ) {
69  }
70 #endif
71  }
72  };
73 
74  // ------------------------------------------------------------------------
75  virtual void SeqEntryInitialize(
76  CRef<CSeq_entry>& se )
77  // ------------------------------------------------------------------------
78  {
80 
82  if ( !m_objmgr ) {
83  /* raise hell */;
84  }
85 
86  m_scope.Reset( new CScope( *m_objmgr ) );
87  if ( !m_scope ) {
88  /* raise hell */;
89  }
90 
93  if ( !m_topseh ) {
94  /* raise hell */;
95  }
96  };
97 
98  // ------------------------------------------------------------------------
99  virtual void SeqEntryFinalize()
100  // ------------------------------------------------------------------------
101  {
103  m_scope.Reset();
105  };
106 
107 protected:
111 };
112 
113 #endif
CArgs –.
Definition: ncbiargs.hpp:379
static TRegisterLoaderInfo RegisterInObjectManager(CObjectManager &om, CReader *reader=0, CObjectManager::EIsDefault is_default=CObjectManager::eDefault, CObjectManager::TPriority priority=CObjectManager::kPriority_NotSet)
Definition: gbloader.cpp:366
CScope –.
Definition: scope.hpp:92
void ProcessInitialize(const CArgs &args)
virtual void SeqEntryInitialize(CRef< CSeq_entry > &se)
virtual void SeqEntryFinalize()
CSeq_entry_Handle m_topseh
CRef< CScope > m_scope
CRef< CObjectManager > m_objmgr
virtual void SeqEntryFinalize()
Definition: process.hpp:99
CRef< CSeq_entry > m_entry
Definition: process.hpp:114
virtual void SeqEntryInitialize(CRef< CSeq_entry > &se)
Definition: process.hpp:76
virtual void ProcessInitialize(const CArgs &args)
Definition: process.hpp:58
CSeq_entry_Handle –.
static TRegisterLoaderInfo RegisterInObjectManager(CObjectManager &om, const SLoaderParams &params, CObjectManager::EIsDefault is_default=CObjectManager::eNonDefault, CObjectManager::TPriority priority=CObjectManager::kPriority_NotSet)
Definition: wgsloader.cpp:85
void ResetHistory(EActionIfLocked action=eKeepIfLocked)
Clean all unused TSEs from the scope's cache and release the memory.
Definition: scope.cpp:325
static CRef< CObjectManager > GetInstance(void)
Return the existing object manager or create one.
CSeq_entry_Handle AddTopLevelSeqEntry(CSeq_entry &top_entry, TPriority pri=kPriority_Default, EExist action=eExist_Default)
Add seq_entry, default priority is higher than for defaults or loaders Add object to the score with p...
Definition: scope.cpp:522
void AddDefaults(TPriority pri=kPriority_Default)
Add default data loaders from object manager.
Definition: scope.cpp:504
void Reset(void)
Reset reference object.
Definition: ncbiobj.hpp:773
Modified on Sat May 25 14:21:54 2024 by modify_doxy.py rev. 669887