⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 data_source.hpp

📁 ncbi源码
💻 HPP
📖 第 1 页 / 共 2 页
字号:
    typedef CRWLock TAnnotLock;#else    typedef CFastMutex TAnnotLock;#endif    typedef TMainLock::TReadLockGuard   TMainReadLockGuard;    typedef TMainLock::TWriteLockGuard  TMainWriteLockGuard;    typedef TAnnotLock::TReadLockGuard  TAnnotReadLockGuard;    typedef TAnnotLock::TWriteLockGuard TAnnotWriteLockGuard;    // Used to lock: m_*_InfoMap, m_TSE_seq    // Is locked before locks in CTSE_Info    mutable TMainLock     m_DSMainLock;    // Used to lock: m_TSE_annot, m_TSE_annot_is_dirty    // Is locked after locks in CTSE_Info    mutable TAnnotLock    m_DSAnnotLock;    CRef<CDataLoader>     m_Loader;    CConstRef<CSeq_entry> m_pTopEntry;    CObjectManager*       m_ObjMgr;    TTSE_Set              m_TSE_Set;    TTSE_InfoMap          m_TSE_InfoMap;       // All known TSEs, (locked once)    TSeq_entry_InfoMap    m_Seq_entry_InfoMap; // All known Seq-entries    TSeq_annot_InfoMap    m_Seq_annot_InfoMap; // All known Seq-annots    TBioseq_InfoMap       m_Bioseq_InfoMap;    // All known Bioseqs    TTSEMap               m_TSE_seq;           // id -> TSE with bioseq    TTSEMap               m_TSE_annot;         // id -> TSE with annots    // TSE with annotations need to be indexed.    TDirtyAnnot_TSEs      m_DirtyAnnot_TSEs;    // Default priority for the datasource    TPriority             m_DefaultPriority;    // Prefetching thread and lock, used when initializing the thread    CRef<CPrefetchThread> m_PrefetchThread;    CFastMutex            m_PrefetchLock;    // hide copy constructor    CDataSource(const CDataSource&);    CDataSource& operator=(const CDataSource&);};inlineCDataLoader* CDataSource::GetDataLoader(void) const{    return const_cast<CDataLoader*>(m_Loader.GetPointerOrNull());}inlineCConstRef<CSeq_entry> CDataSource::GetTopEntry(void){    return m_pTopEntry;}inlinebool CDataSource::IsEmpty(void) const{    return m_Loader == 0  &&  m_TSE_Set.empty();}inlinebool CDataSource::IsLive(const CTSE_Info& tse){    return !tse.IsDead();}inlineCDataSource::TPriority CDataSource::GetDefaultPriority(void) const{    return m_DefaultPriority;}inlinevoid CDataSource::SetDefaultPriority(TPriority priority){    m_DefaultPriority = priority;}END_SCOPE(objects)END_NCBI_SCOPE/** ---------------------------------------------------------------------------* $Log: data_source.hpp,v $* Revision 1000.2  2004/04/16 16:59:58  gouriano* PRODUCTION: UPGRADED [CATCHUP_003] Dev-tree R1.74** Revision 1.74  2004/04/16 13:31:46  grichenk* Added data pre-fetching functions.** Revision 1.73  2004/03/31 17:08:06  vasilche* Implemented ConvertSeqToSet and ConvertSetToSeq.** Revision 1.72  2004/03/24 18:30:28  vasilche* Fixed edit API.* Every *_Info object has its own shallow copy of original object.** Revision 1.71  2004/03/16 15:47:26  vasilche* Added CBioseq_set_Handle and set of EditHandles** Revision 1.70  2004/02/03 19:02:16  vasilche* Fixed broken 'dirty annot index' state after RemoveEntry().** Revision 1.69  2004/02/02 14:46:42  vasilche* Several performance fixed - do not iterate whole tse set in CDataSource.** Revision 1.68  2003/12/18 16:38:05  grichenk* Added CScope::RemoveEntry()** Revision 1.67  2003/10/07 13:43:22  vasilche* Added proper handling of named Seq-annots.* Added feature search from named Seq-annots.* Added configurable adaptive annotation search (default: gene, cds, mrna).* Fixed selection of blobs for loading from GenBank.* Added debug checks to CSeq_id_Mapper for easier finding lost CSeq_id_Handles.* Fixed leaked split chunks annotation stubs.* Moved some classes definitions in separate *.cpp files.** Revision 1.66  2003/09/30 16:22:01  vasilche* Updated internal object manager classes to be able to load ID2 data.* SNP blobs are loaded as ID2 split blobs - readers convert them automatically.* Scope caches results of requests for data to data loaders.* Optimized CSeq_id_Handle for gis.* Optimized bioseq lookup in scope.* Reduced object allocations in annotation iterators.* CScope is allowed to be destroyed before other objects using this scope are* deleted (feature iterators, bioseq handles etc).* Optimized lookup for matching Seq-ids in CSeq_id_Mapper.* Added 'adaptive' option to objmgr_demo application.** Revision 1.65  2003/09/03 20:00:00  grichenk* Added sequence filtering by level (mains/parts/all)** Revision 1.64  2003/08/15 19:19:15  vasilche* Fixed memory leak in string packing hooks.* Fixed processing of 'partial' flag of features.* Allow table packing of non-point SNP.* Allow table packing of SNP with long alleles.** Revision 1.63  2003/08/14 20:05:18  vasilche* Simple SNP features are stored as table internally.* They are recreated when needed using CFeat_CI.** Revision 1.62  2003/08/06 20:51:16  grichenk* Removed declarations of non-existent methods** Revision 1.61  2003/08/04 17:04:29  grichenk* Added default data-source priority assignment.* Added support for iterating all annotations from a* seq-entry or seq-annot.** Revision 1.60  2003/07/17 20:07:55  vasilche* Reduced memory usage by feature indexes.* SNP data is loaded separately through PUBSEQ_OS.* String compression for SNP data.** Revision 1.59  2003/06/24 14:25:18  vasilche* Removed obsolete CTSE_Guard class.* Used separate mutexes for bioseq and annot maps.** Revision 1.58  2003/06/19 18:23:44  vasilche* Added several CXxx_ScopeInfo classes for CScope related information.* CBioseq_Handle now uses reference to CBioseq_ScopeInfo.* Some fine tuning of locking in CScope.** Revision 1.55  2003/05/20 15:44:37  vasilche* Fixed interaction of CDataSource and CDataLoader in multithreaded app.* Fixed some warnings on WorkShop.* Added workaround for memory leak on WorkShop.** Revision 1.54  2003/05/14 18:39:26  grichenk* Simplified TSE caching and filtering in CScope, removed* some obsolete members and functions.** Revision 1.53  2003/05/06 18:54:08  grichenk* Moved TSE filtering from CDataSource to CScope, changed* some filtering rules (e.g. priority is now more important* than scope history). Added more caches to CScope.** Revision 1.52  2003/05/05 20:59:48  vasilche* Use one static mutex for all instances of CTSE_LockingSet.** Revision 1.51  2003/04/29 19:51:12  vasilche* Fixed interaction of Data Loader garbage collector and TSE locking mechanism.* Made some typedefs more consistent.** Revision 1.50  2003/04/24 16:12:37  vasilche* Object manager internal structures are splitted more straightforward.* Removed excessive header dependencies.** Revision 1.49  2003/04/14 21:32:16  grichenk* Avoid passing CScope as an argument to CDataSource methods** Revision 1.48  2003/03/24 21:26:43  grichenk* Added support for CTSE_CI** Revision 1.47  2003/03/21 19:22:50  grichenk* Redesigned TSE locking, replaced CTSE_Lock with CRef<CTSE_Info>.** Revision 1.46  2003/03/18 21:48:28  grichenk* Removed obsolete class CAnnot_CI** Revision 1.45  2003/03/18 14:52:57  grichenk* Removed obsolete methods, replaced seq-id with seq-id handle* where possible. Added argument to limit annotations update to* a single seq-entry.** Revision 1.44  2003/03/11 14:15:50  grichenk* +Data-source priority** Revision 1.43  2003/03/10 16:55:16  vasilche* Cleaned SAnnotSelector structure.* Added shortcut when features are limited to one TSE.** Revision 1.42  2003/03/03 20:31:09  vasilche* Removed obsolete method PopulateTSESet().** Revision 1.41  2003/02/27 14:35:32  vasilche* Splitted PopulateTSESet() by logically independent parts.** Revision 1.40  2003/02/25 14:48:07  vasilche* Added Win32 export modifier to object manager classes.** Revision 1.39  2003/02/24 18:57:21  vasilche* Make feature gathering in one linear pass using CSeqMap iterator.* Do not use feture index by sub locations.* Sort features at the end of gathering in one vector.* Extracted some internal structures and classes in separate header.* Delay creation of mapped features.** Revision 1.38  2003/02/24 14:51:10  grichenk* Minor improvements in annot indexing** Revision 1.37  2003/02/13 14:34:32  grichenk* Renamed CAnnotObject -> CAnnotObject_Info* + CSeq_annot_Info and CAnnotObject_Ref* Moved some members of CAnnotObject to CSeq_annot_Info* and CAnnotObject_Ref.* Added feat/align/graph to CAnnotObject_Info map* to CDataSource.** Revision 1.36  2003/02/05 17:57:41  dicuccio* Moved into include/objects/objmgr/impl to permit data loaders to be defined* outside of xobjmgr.** Revision 1.35  2003/01/29 22:03:46  grichenk* Use single static CSeq_id_Mapper instead of per-OM model.** Revision 1.34  2003/01/22 20:11:54  vasilche* Merged functionality of CSeqMapResolved_CI to CSeqMap_CI.* CSeqMap_CI now supports resolution and iteration over sequence range.* Added several caches to CScope.* Optimized CSeqVector().* Added serveral variants of CBioseqHandle::GetSeqVector().* Tried to optimize annotations iterator (not much success).* Rewritten CHandleRange and CHandleRangeMap classes to avoid sorting of list.** Revision 1.33  2002/12/26 20:55:17  dicuccio* Moved seq_id_mapper.hpp, tse_info.hpp, and bioseq_info.hpp -> include/ tree** Revision 1.32  2002/12/26 16:39:24  vasilche* Object manager class CSeqMap rewritten.** Revision 1.31  2002/12/06 15:36:00  grichenk* Added overlap type for annot-iterators** Revision 1.30  2002/11/08 22:15:51  grichenk* Added methods for removing/replacing annotations** Revision 1.29  2002/10/18 19:12:40  grichenk* Removed mutex pools, converted most static mutexes to non-static.* Protected CSeqMap::x_Resolve() with mutex. Modified code to prevent* dead-locks.** Revision 1.28  2002/10/02 17:58:23  grichenk* Added sequence type filter to CBioseq_CI** Revision 1.27  2002/09/30 20:01:19  grichenk* Added methods to support CBioseq_CI** Revision 1.26  2002/07/08 20:51:01  grichenk* Moved log to the end of file* Replaced static mutex (in CScope, CDataSource) with the mutex* pool. Redesigned CDataSource data locking.** Revision 1.25  2002/06/04 17:18:33  kimelman* memory cleanup :  new/delete/Cref rearrangements** Revision 1.24  2002/05/31 17:53:00  grichenk* Optimized for better performance (CTSE_Info uses atomic counter,* delayed annotations indexing, no location convertions in* CAnnot_Types_CI if no references resolution is required etc.)** Revision 1.23  2002/05/28 18:00:43  gouriano* DebugDump added** Revision 1.22  2002/05/14 20:06:26  grichenk* Improved CTSE_Info locking by CDataSource and CDataLoader** Revision 1.21  2002/05/06 03:28:47  vakatov* OM/OM1 renaming** Revision 1.20  2002/05/03 21:28:09  ucko* Introduce T(Signed)SeqPos.** Revision 1.19  2002/04/17 21:09:14  grichenk* Fixed annotations loading* +IsSynonym()** Revision 1.18  2002/04/11 12:08:21  grichenk* Fixed GetResolvedSeqMap() implementation** Revision 1.17  2002/03/28 14:02:31  grichenk* Added scope history checks to CDataSource::x_FindBestTSE()** Revision 1.16  2002/03/20 04:50:13  kimelman* GB loader added** Revision 1.15  2002/03/07 21:25:34  grichenk* +GetSeq_annot() in annotation iterators** Revision 1.14  2002/03/05 18:44:55  grichenk* +x_UpdateTSEStatus()** Revision 1.13  2002/03/05 16:09:10  grichenk* Added x_CleanupUnusedEntries()** Revision 1.12  2002/03/04 15:09:27  grichenk* Improved MT-safety. Added live/dead flag to CDataSource methods.** Revision 1.11  2002/03/01 19:41:34  gouriano* *** empty log message ***** Revision 1.10  2002/02/28 20:53:32  grichenk* Implemented attaching segmented sequence data. Fixed minor bugs.** Revision 1.9  2002/02/21 19:27:05  grichenk* Rearranged includes. Added scope history. Added searching for the* best seq-id match in data sources and scopes. Updated tests.** Revision 1.8  2002/02/07 21:27:35  grichenk* Redesigned CDataSource indexing: seq-id handle -> TSE -> seq/annot** Revision 1.7  2002/02/06 21:46:11  gouriano* *** empty log message ***** Revision 1.6  2002/02/05 21:46:28  gouriano* added FindSeqid function, minor tuneup in CSeq_id_mapper** Revision 1.5  2002/01/29 17:45:00  grichenk* Added seq-id handles locking** Revision 1.4  2002/01/28 19:44:49  gouriano* changed the interface of BioseqHandle: two functions moved from Scope** Revision 1.3  2002/01/23 21:59:31  grichenk* Redesigned seq-id handles and mapper** Revision 1.2  2002/01/18 15:56:24  gouriano* changed TSeqMaps definition** Revision 1.1  2002/01/16 16:25:55  gouriano* restructured objmgr** Revision 1.1  2002/01/11 19:04:01  gouriano* restructured objmgr*** ===========================================================================*/#endif  // OBJECTS_OBJMGR_IMPL___DATA_SOURCE__HPP

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -