scope.cpp
上传用户:yhdzpy8989
上传日期:2007-06-13
资源大小:13604k
文件大小:22k
源码类别:

生物技术

开发平台:

C/C++

  1. /*
  2.  * ===========================================================================
  3.  * PRODUCTION $Log: scope.cpp,v $
  4.  * PRODUCTION Revision 1000.5  2004/06/01 19:23:36  gouriano
  5.  * PRODUCTION PRODUCTION: UPGRADED [GCC34_MSVC7] Dev-tree R1.107
  6.  * PRODUCTION
  7.  * ===========================================================================
  8.  */
  9. /*  $Id: scope.cpp,v 1000.5 2004/06/01 19:23:36 gouriano Exp $
  10. * ===========================================================================
  11. *
  12. *                            PUBLIC DOMAIN NOTICE
  13. *               National Center for Biotechnology Information
  14. *
  15. *  This software/database is a "United States Government Work" under the
  16. *  terms of the United States Copyright Act.  It was written as part of
  17. *  the author's official duties as a United States Government employee and
  18. *  thus cannot be copyrighted.  This software/database is freely available
  19. *  to the public for use. The National Library of Medicine and the U.S.
  20. *  Government have not placed any restriction on its use or reproduction.
  21. *
  22. *  Although all reasonable efforts have been taken to ensure the accuracy
  23. *  and reliability of the software and data, the NLM and the U.S.
  24. *  Government do not and cannot warrant the performance or results that
  25. *  may be obtained by using this software or data. The NLM and the U.S.
  26. *  Government disclaim all warranties, express or implied, including
  27. *  warranties of performance, merchantability or fitness for any particular
  28. *  purpose.
  29. *
  30. *  Please cite the author in any work or product based on this material.
  31. *
  32. * ===========================================================================
  33. *
  34. * Authors:
  35. *           Andrei Gourianov
  36. *           Aleksey Grichenko
  37. *           Michael Kimelman
  38. *           Denis Vakatov
  39. *           Eugene Vasilchenko
  40. *
  41. * File Description:
  42. *           Scope is top-level object available to a client.
  43. *           Its purpose is to define a scope of visibility and reference
  44. *           resolution and provide access to the bio sequence data
  45. *
  46. */
  47. #include <ncbi_pch.hpp>
  48. #include <objmgr/scope.hpp>
  49. #include <objmgr/bioseq_handle.hpp>
  50. #include <objmgr/seq_entry_handle.hpp>
  51. #include <objmgr/seq_annot_handle.hpp>
  52. #include <objmgr/bioseq_set_handle.hpp>
  53. #include <objmgr/impl/scope_impl.hpp>
  54. #include <objmgr/impl/synonyms.hpp>
  55. BEGIN_NCBI_SCOPE
  56. BEGIN_SCOPE(objects)
  57. /////////////////////////////////////////////////////////////////////////////
  58. //
  59. // CScope
  60. //
  61. /////////////////////////////////////////////////////////////////////////////
  62. CScope::CScope(CObjectManager& objmgr)
  63. {
  64.     if ( CanBeDeleted() ) {
  65.         // this CScope object is allocated in heap
  66.         m_Impl.Reset(new CScope_Impl(objmgr));
  67.         m_Impl->m_HeapScope = this;
  68.     }
  69.     else {
  70.         // allocate heap CScope object
  71.         m_HeapScope.Reset(new CScope(objmgr));
  72.         _ASSERT(m_HeapScope->CanBeDeleted());
  73.         m_Impl = m_HeapScope->m_Impl;
  74.         _ASSERT(m_Impl);
  75.     }
  76. }
  77. CScope::~CScope(void)
  78. {
  79.     if ( bool(m_Impl) && m_Impl->m_HeapScope == this ) {
  80.         m_Impl->m_HeapScope = 0;
  81.     }
  82. }
  83. CBioseq_Handle CScope::GetBioseqHandle(const CSeq_id& id)
  84. {
  85.     return m_Impl->GetBioseqHandle(id, eGetBioseq_All);
  86. }
  87. CBioseq_Handle CScope::GetBioseqHandle(const CSeq_id_Handle& id)
  88. {
  89.     return m_Impl->GetBioseqHandle(id, eGetBioseq_All);
  90. }
  91. CBioseq_Handle CScope::GetBioseqHandle(const CSeq_loc& loc)
  92. {
  93.     return m_Impl->GetBioseqHandle(loc, eGetBioseq_All);
  94. }
  95. CBioseq_Handle CScope::GetBioseqHandle(const CBioseq& seq)
  96. {
  97.     //ERR_POST_ONCE(Warning<<"CScope::GetBioseqHandle(CBioseq&) is deprecated");
  98.     return m_Impl->GetBioseqHandle(seq);
  99. }
  100. CBioseq_Handle CScope::GetBioseqHandle(const CSeq_id& id,
  101.                                        EGetBioseqFlag get_flag)
  102. {
  103.     return m_Impl->GetBioseqHandle(id, get_flag);
  104. }
  105. CBioseq_Handle CScope::GetBioseqHandle(const CSeq_id_Handle& id,
  106.                                        EGetBioseqFlag get_flag)
  107. {
  108.     return m_Impl->GetBioseqHandle(id, get_flag);
  109. }
  110. CSeq_entry_Handle CScope::GetSeq_entryHandle(const CSeq_entry& entry)
  111. {
  112.     //ERR_POST_ONCE(Warning<<"CScope::GetSeq_entryHandle(CSeq_entry&) is deprecated.");
  113.     return m_Impl->GetSeq_entryHandle(entry);
  114. }
  115. CSeq_annot_Handle CScope::GetSeq_annotHandle(const CSeq_annot& annot)
  116. {
  117.     //ERR_POST_ONCE(Warning<<"CScope::GetSeq_annotHandle(CSeq_annot&) is deprecated.");
  118.     return m_Impl->GetSeq_annotHandle(annot);
  119. }
  120. CBioseq_Handle CScope::GetBioseqHandleFromTSE(const CSeq_id& id,
  121.                                               const CBioseq_Handle& bh)
  122. {
  123.     return m_Impl->GetBioseqHandleFromTSE(id, bh);
  124. }
  125. CBioseq_Handle CScope::GetBioseqHandleFromTSE(const CSeq_id& id,
  126.                                               const CSeq_entry_Handle& seh)
  127. {
  128.     return m_Impl->GetBioseqHandleFromTSE(id, seh);
  129. }
  130. CBioseq_Handle CScope::GetBioseqHandleFromTSE(const CSeq_id_Handle& id,
  131.                                               const CBioseq_Handle& bh)
  132. {
  133.     return m_Impl->GetBioseqHandleFromTSE(id, bh);
  134. }
  135. CBioseq_Handle CScope::GetBioseqHandleFromTSE(const CSeq_id_Handle& id,
  136.                                               const CSeq_entry_Handle& seh)
  137. {
  138.     return m_Impl->GetBioseqHandleFromTSE(id, seh);
  139. }
  140. void CScope::GetAllTSEs(TTSE_Handles& tses, enum ETSEKind kind)
  141. {
  142.     m_Impl->GetAllTSEs(tses, int(kind));
  143. }
  144. CBioseq_EditHandle CScope::GetEditHandle(const CBioseq_Handle& seq)
  145. {
  146.     return m_Impl->GetEditHandle(seq);
  147. }
  148. CSeq_entry_EditHandle CScope::GetEditHandle(const CSeq_entry_Handle& entry)
  149. {
  150.     return m_Impl->GetEditHandle(entry);
  151. }
  152. CSeq_annot_EditHandle CScope::GetEditHandle(const CSeq_annot_Handle& annot)
  153. {
  154.     return m_Impl->GetEditHandle(annot);
  155. }
  156. CBioseq_set_EditHandle CScope::GetEditHandle(const CBioseq_set_Handle& seqset)
  157. {
  158.     return m_Impl->GetEditHandle(seqset);
  159. }
  160. void CScope::ResetHistory(void)
  161. {
  162.     m_Impl->ResetHistory();
  163. }
  164. CConstRef<CSynonymsSet> CScope::GetSynonyms(const CSeq_id& id)
  165. {
  166.     return m_Impl->GetSynonyms(id);
  167. }
  168. CConstRef<CSynonymsSet> CScope::GetSynonyms(const CSeq_id_Handle& id)
  169. {
  170.     return m_Impl->GetSynonyms(id);
  171. }
  172. CConstRef<CSynonymsSet> CScope::GetSynonyms(const CBioseq_Handle& bh)
  173. {
  174.     return m_Impl->GetSynonyms(bh);
  175. }
  176. void CScope::AddDefaults(TPriority priority)
  177. {
  178.     m_Impl->AddDefaults(priority);
  179. }
  180. void CScope::AddDataLoader(const string& loader_name, TPriority priority)
  181. {
  182.     m_Impl->AddDataLoader(loader_name, priority);
  183. }
  184. void CScope::AddScope(CScope& scope, TPriority priority)
  185. {
  186.     m_Impl->AddScope(*scope.m_Impl, priority);
  187. }
  188. CSeq_entry_Handle CScope::AddTopLevelSeqEntry(CSeq_entry& top_entry,
  189.                                               TPriority priority)
  190. {
  191.     return m_Impl->AddTopLevelSeqEntry(top_entry, priority);
  192. }
  193. CBioseq_Handle CScope::AddBioseq(CBioseq& bioseq, TPriority priority)
  194. {
  195.     return m_Impl->AddBioseq(bioseq, priority);
  196. }
  197. CBioseq_Handle CScope::GetBioseqHandleFromTSE(const CSeq_id& id,
  198.                                               const CSeq_entry& tse)
  199. {
  200.     //ERR_POST_ONCE(Warning<<"GetBioseqHandleFromTSE(CSeq_entry) is deprecated: use handles.");
  201.     return GetBioseqHandleFromTSE(id, GetSeq_entryHandle(tse));
  202. }
  203. CBioseq_Handle CScope::GetBioseqHandleFromTSE(const CSeq_id_Handle& id,
  204.                                               const CSeq_entry& tse)
  205. {
  206.     //ERR_POST_ONCE(Warning<<"GetBioseqHandleFromTSE(CSeq_entry) is deprecated: use handles.");
  207.     return GetBioseqHandleFromTSE(id, GetSeq_entryHandle(tse));
  208. }
  209. void CScope::AttachEntry(CSeq_entry& parent, CSeq_entry& entry)
  210. {
  211.     //ERR_POST_ONCE(Warning<<"CScope::AttachEntry() is deprecated: use class CSeq_entry_EditHandle.");
  212.     GetSeq_entryHandle(parent).GetSet().GetEditHandle().AttachEntry(entry);
  213. }
  214. void CScope::RemoveEntry(CSeq_entry& entry)
  215. {
  216.     //ERR_POST_ONCE(Warning<<"CScope::RemoveEntry() is deprecated: use class CSeq_entry_EditHandle.");
  217.     GetSeq_entryHandle(entry).GetEditHandle().Remove();
  218. }
  219. void CScope::AttachAnnot(CSeq_entry& parent, CSeq_annot& annot)
  220. {
  221.     //ERR_POST_ONCE(Warning<<"CScope::AttachAnnot() is deprecated: use class CSeq_annot_EditHandle.");
  222.     GetSeq_entryHandle(parent).GetEditHandle().AttachAnnot(annot);
  223. }
  224. void CScope::RemoveAnnot(CSeq_entry& parent, CSeq_annot& annot)
  225. {
  226.     //ERR_POST_ONCE(Warning<<"CScope::RemoveAnnot() is deprecated: use class CSeq_annot_EditHandle.");
  227.     CSeq_entry_EditHandle eh = GetSeq_entryHandle(parent).GetEditHandle();
  228.     CSeq_annot_EditHandle ah = GetSeq_annotHandle(annot).GetEditHandle();
  229.     if ( ah.GetParentEntry() != eh ) {
  230.         NCBI_THROW(CObjMgrException, eModifyDataError,
  231.                    "CScope::RemoveAnnot: parent doesn't contain annot");
  232.     }
  233.     ah.Remove();
  234. }
  235. void CScope::ReplaceAnnot(CSeq_entry& parent,
  236.                           CSeq_annot& old_annot, CSeq_annot& new_annot)
  237. {
  238.     //ERR_POST_ONCE(Warning<<"CScope::RemoveAnnot() is deprecated: use class CSeq_annot_EditHandle.");
  239.     CSeq_entry_EditHandle eh = GetSeq_entryHandle(parent).GetEditHandle();
  240.     CSeq_annot_EditHandle ah = GetSeq_annotHandle(old_annot).GetEditHandle();
  241.     if ( ah.GetParentEntry() != eh ) {
  242.         NCBI_THROW(CObjMgrException, eModifyDataError,
  243.                    "CScope::ReplaceAnnot: parent doesn't contain old_annot");
  244.     }
  245.     ah.Remove();
  246.     eh.AttachAnnot(new_annot);
  247. }
  248. END_SCOPE(objects)
  249. END_NCBI_SCOPE
  250. /*
  251. * ---------------------------------------------------------------------------
  252. * $Log: scope.cpp,v $
  253. * Revision 1000.5  2004/06/01 19:23:36  gouriano
  254. * PRODUCTION: UPGRADED [GCC34_MSVC7] Dev-tree R1.107
  255. *
  256. * Revision 1.107  2004/05/21 21:42:12  gorelenk
  257. * Added PCH ncbi_pch.hpp
  258. *
  259. * Revision 1.106  2004/04/13 15:59:35  grichenk
  260. * Added CScope::GetBioseqHandle() with id resolving flag.
  261. *
  262. * Revision 1.105  2004/04/12 18:40:24  grichenk
  263. * Added GetAllTSEs()
  264. *
  265. * Revision 1.104  2004/03/24 18:30:30  vasilche
  266. * Fixed edit API.
  267. * Every *_Info object has its own shallow copy of original object.
  268. *
  269. * Revision 1.103  2004/03/16 21:01:32  vasilche
  270. * Added methods to move Bioseq withing Seq-entry
  271. *
  272. * Revision 1.102  2004/03/16 15:47:28  vasilche
  273. * Added CBioseq_set_Handle and set of EditHandles
  274. *
  275. * Revision 1.101  2004/02/19 17:23:01  vasilche
  276. * Changed order of deletion of heap scope and scope impl objects.
  277. * Reduce number of calls to x_ResetHistory().
  278. *
  279. * Revision 1.100  2004/02/10 21:15:16  grichenk
  280. * Added reverse ID matching.
  281. *
  282. * Revision 1.99  2004/02/09 14:42:46  vasilche
  283. * Temporary fix in GetSynonyms() to get accession without version.
  284. *
  285. * Revision 1.98  2004/02/02 14:46:43  vasilche
  286. * Several performance fixed - do not iterate whole tse set in CDataSource.
  287. *
  288. * Revision 1.97  2004/01/29 20:33:28  vasilche
  289. * Do not resolve any Seq-ids in CScope::GetSynonyms() -
  290. * assume all not resolved Seq-id as synonym.
  291. * Seq-id conflict messages made clearer.
  292. *
  293. * Revision 1.96  2004/01/28 20:50:49  vasilche
  294. * Fixed NULL pointer exception in GetSynonyms() when matching Seq-id w/o version.
  295. *
  296. * Revision 1.95  2004/01/07 20:42:01  grichenk
  297. * Fixed matching of accession to accession.version
  298. *
  299. * Revision 1.94  2003/12/18 16:38:07  grichenk
  300. * Added CScope::RemoveEntry()
  301. *
  302. * Revision 1.93  2003/12/12 16:59:51  grichenk
  303. * Fixed conflicts resolving (ask data source).
  304. *
  305. * Revision 1.92  2003/12/03 20:55:12  grichenk
  306. * Check value returned by x_GetBioseq_Info()
  307. *
  308. * Revision 1.91  2003/11/21 20:33:03  grichenk
  309. * Added GetBioseqHandleFromTSE(CSeq_id, CSeq_entry)
  310. *
  311. * Revision 1.90  2003/11/19 22:18:03  grichenk
  312. * All exceptions are now CException-derived. Catch "exception" rather
  313. * than "runtime_error".
  314. *
  315. * Revision 1.89  2003/11/12 15:49:39  vasilche
  316. * Added loading annotations on non gi Seq-id.
  317. *
  318. * Revision 1.88  2003/10/23 13:47:27  vasilche
  319. * Check CSeq_id_Handle for null in CScope::GetBioseqHandle().
  320. *
  321. * Revision 1.87  2003/10/22 14:08:15  vasilche
  322. * Detach all CBbioseq_Handle objects from scope in CScope::ResetHistory().
  323. *
  324. * Revision 1.86  2003/10/22 13:54:36  vasilche
  325. * All CScope::GetBioseqHandle() methods return 'null' CBioseq_Handle object
  326. * instead of throwing an exception.
  327. *
  328. * Revision 1.85  2003/10/20 18:23:54  vasilche
  329. * Make CScope::GetSynonyms() to skip conflicting ids.
  330. *
  331. * Revision 1.84  2003/10/09 13:58:21  vasilche
  332. * Fixed conflict when the same datasource appears twice with equal priorities.
  333. *
  334. * Revision 1.83  2003/10/07 13:43:23  vasilche
  335. * Added proper handling of named Seq-annots.
  336. * Added feature search from named Seq-annots.
  337. * Added configurable adaptive annotation search (default: gene, cds, mrna).
  338. * Fixed selection of blobs for loading from GenBank.
  339. * Added debug checks to CSeq_id_Mapper for easier finding lost CSeq_id_Handles.
  340. * Fixed leaked split chunks annotation stubs.
  341. * Moved some classes definitions in separate *.cpp files.
  342. *
  343. * Revision 1.82  2003/09/30 16:22:03  vasilche
  344. * Updated internal object manager classes to be able to load ID2 data.
  345. * SNP blobs are loaded as ID2 split blobs - readers convert them automatically.
  346. * Scope caches results of requests for data to data loaders.
  347. * Optimized CSeq_id_Handle for gis.
  348. * Optimized bioseq lookup in scope.
  349. * Reduced object allocations in annotation iterators.
  350. * CScope is allowed to be destroyed before other objects using this scope are
  351. * deleted (feature iterators, bioseq handles etc).
  352. * Optimized lookup for matching Seq-ids in CSeq_id_Mapper.
  353. * Added 'adaptive' option to objmgr_demo application.
  354. *
  355. * Revision 1.81  2003/09/05 20:50:26  grichenk
  356. * +AddBioseq(CBioseq&)
  357. *
  358. * Revision 1.80  2003/09/05 17:29:40  grichenk
  359. * Structurized Object Manager exceptions
  360. *
  361. * Revision 1.79  2003/09/03 20:00:02  grichenk
  362. * Added sequence filtering by level (mains/parts/all)
  363. *
  364. * Revision 1.78  2003/08/04 17:03:01  grichenk
  365. * Added constructors to iterate all annotations from a
  366. * seq-entry or seq-annot.
  367. *
  368. * Revision 1.77  2003/07/25 15:25:25  grichenk
  369. * Added CSeq_annot_CI class
  370. *
  371. * Revision 1.76  2003/07/17 20:07:56  vasilche
  372. * Reduced memory usage by feature indexes.
  373. * SNP data is loaded separately through PUBSEQ_OS.
  374. * String compression for SNP data.
  375. *
  376. * Revision 1.75  2003/07/14 21:13:59  grichenk
  377. * Added seq-loc dump in GetBioseqHandle(CSeqLoc)
  378. *
  379. * Revision 1.74  2003/06/30 18:42:10  vasilche
  380. * CPriority_I made to use less memory allocations/deallocations.
  381. *
  382. * Revision 1.73  2003/06/24 14:25:18  vasilche
  383. * Removed obsolete CTSE_Guard class.
  384. * Used separate mutexes for bioseq and annot maps.
  385. *
  386. * Revision 1.72  2003/06/19 18:23:46  vasilche
  387. * Added several CXxx_ScopeInfo classes for CScope related information.
  388. * CBioseq_Handle now uses reference to CBioseq_ScopeInfo.
  389. * Some fine tuning of locking in CScope.
  390. *
  391. * Revision 1.69  2003/05/27 19:44:06  grichenk
  392. * Added CSeqVector_CI class
  393. *
  394. * Revision 1.68  2003/05/20 15:44:37  vasilche
  395. * Fixed interaction of CDataSource and CDataLoader in multithreaded app.
  396. * Fixed some warnings on WorkShop.
  397. * Added workaround for memory leak on WorkShop.
  398. *
  399. * Revision 1.67  2003/05/14 18:39:28  grichenk
  400. * Simplified TSE caching and filtering in CScope, removed
  401. * some obsolete members and functions.
  402. *
  403. * Revision 1.66  2003/05/13 18:33:01  vasilche
  404. * Fixed CScope::GetTSESetWithAnnots() conflict resolution.
  405. *
  406. * Revision 1.65  2003/05/12 19:18:29  vasilche
  407. * Fixed locking of object manager classes in multi-threaded application.
  408. *
  409. * Revision 1.64  2003/05/09 20:28:03  grichenk
  410. * Changed warnings to info
  411. *
  412. * Revision 1.63  2003/05/06 18:54:09  grichenk
  413. * Moved TSE filtering from CDataSource to CScope, changed
  414. * some filtering rules (e.g. priority is now more important
  415. * than scope history). Added more caches to CScope.
  416. *
  417. * Revision 1.62  2003/04/29 19:51:13  vasilche
  418. * Fixed interaction of Data Loader garbage collector and TSE locking mechanism.
  419. * Made some typedefs more consistent.
  420. *
  421. * Revision 1.61  2003/04/24 16:12:38  vasilche
  422. * Object manager internal structures are splitted more straightforward.
  423. * Removed excessive header dependencies.
  424. *
  425. * Revision 1.60  2003/04/15 14:21:52  vasilche
  426. * Removed unnecessary assignment.
  427. *
  428. * Revision 1.59  2003/04/14 21:32:18  grichenk
  429. * Avoid passing CScope as an argument to CDataSource methods
  430. *
  431. * Revision 1.58  2003/04/09 16:04:32  grichenk
  432. * SDataSourceRec replaced with CPriorityNode
  433. * Added CScope::AddScope(scope, priority) to allow scope nesting
  434. *
  435. * Revision 1.57  2003/04/03 14:18:09  vasilche
  436. * Added public GetSynonyms() method.
  437. *
  438. * Revision 1.56  2003/03/26 21:00:19  grichenk
  439. * Added seq-id -> tse with annotation cache to CScope
  440. *
  441. * Revision 1.55  2003/03/24 21:26:45  grichenk
  442. * Added support for CTSE_CI
  443. *
  444. * Revision 1.54  2003/03/21 19:22:51  grichenk
  445. * Redesigned TSE locking, replaced CTSE_Lock with CRef<CTSE_Info>.
  446. *
  447. * Revision 1.53  2003/03/19 21:55:50  grichenk
  448. * Avoid re-mapping TSEs in x_AddToHistory() if already indexed
  449. *
  450. * Revision 1.52  2003/03/18 14:52:59  grichenk
  451. * Removed obsolete methods, replaced seq-id with seq-id handle
  452. * where possible. Added argument to limit annotations update to
  453. * a single seq-entry.
  454. *
  455. * Revision 1.51  2003/03/12 20:09:34  grichenk
  456. * Redistributed members between CBioseq_Handle, CBioseq_Info and CTSE_Info
  457. *
  458. * Revision 1.50  2003/03/11 15:51:06  kuznets
  459. * iterate -> ITERATE
  460. *
  461. * Revision 1.49  2003/03/11 14:15:52  grichenk
  462. * +Data-source priority
  463. *
  464. * Revision 1.48  2003/03/10 16:55:17  vasilche
  465. * Cleaned SAnnotSelector structure.
  466. * Added shortcut when features are limited to one TSE.
  467. *
  468. * Revision 1.47  2003/03/05 20:55:29  vasilche
  469. * Added cache cleaning in CScope::ResetHistory().
  470. *
  471. * Revision 1.46  2003/03/03 20:32:47  vasilche
  472. * Removed obsolete method GetSynonyms().
  473. *
  474. * Revision 1.45  2003/02/28 21:54:18  grichenk
  475. * +CSynonymsSet::empty(), removed _ASSERT() in CScope::GetSynonyms()
  476. *
  477. * Revision 1.44  2003/02/28 20:02:37  grichenk
  478. * Added synonyms cache and x_GetSynonyms()
  479. *
  480. * Revision 1.43  2003/02/27 14:35:31  vasilche
  481. * Splitted PopulateTSESet() by logically independent parts.
  482. *
  483. * Revision 1.42  2003/02/24 18:57:22  vasilche
  484. * Make feature gathering in one linear pass using CSeqMap iterator.
  485. * Do not use feture index by sub locations.
  486. * Sort features at the end of gathering in one vector.
  487. * Extracted some internal structures and classes in separate header.
  488. * Delay creation of mapped features.
  489. *
  490. * Revision 1.41  2003/02/05 17:59:17  dicuccio
  491. * Moved formerly private headers into include/objects/objmgr/impl
  492. *
  493. * Revision 1.40  2003/01/29 22:03:46  grichenk
  494. * Use single static CSeq_id_Mapper instead of per-OM model.
  495. *
  496. * Revision 1.39  2003/01/22 20:11:54  vasilche
  497. * Merged functionality of CSeqMapResolved_CI to CSeqMap_CI.
  498. * CSeqMap_CI now supports resolution and iteration over sequence range.
  499. * Added several caches to CScope.
  500. * Optimized CSeqVector().
  501. * Added serveral variants of CBioseqHandle::GetSeqVector().
  502. * Tried to optimize annotations iterator (not much success).
  503. * Rewritten CHandleRange and CHandleRangeMap classes to avoid sorting of list.
  504. *
  505. * Revision 1.38  2002/12/26 20:55:18  dicuccio
  506. * Moved seq_id_mapper.hpp, tse_info.hpp, and bioseq_info.hpp -> include/ tree
  507. *
  508. * Revision 1.37  2002/12/26 16:39:24  vasilche
  509. * Object manager class CSeqMap rewritten.
  510. *
  511. * Revision 1.36  2002/11/08 22:15:51  grichenk
  512. * Added methods for removing/replacing annotations
  513. *
  514. * Revision 1.35  2002/11/08 19:43:35  grichenk
  515. * CConstRef<> constructor made explicit
  516. *
  517. * Revision 1.34  2002/11/04 21:29:12  grichenk
  518. * Fixed usage of const CRef<> and CRef<> constructor
  519. *
  520. * Revision 1.33  2002/11/01 05:34:32  kans
  521. * added GetBioseqHandle taking CBioseq parameter
  522. *
  523. * Revision 1.32  2002/10/31 22:25:42  kans
  524. * added GetBioseqHandle taking CSeq_loc parameter
  525. *
  526. * Revision 1.31  2002/10/18 19:12:40  grichenk
  527. * Removed mutex pools, converted most static mutexes to non-static.
  528. * Protected CSeqMap::x_Resolve() with mutex. Modified code to prevent
  529. * dead-locks.
  530. *
  531. * Revision 1.30  2002/10/16 20:44:29  ucko
  532. * *** empty log message ***
  533. *
  534. * Revision 1.29  2002/10/02 17:58:23  grichenk
  535. * Added sequence type filter to CBioseq_CI
  536. *
  537. * Revision 1.28  2002/09/30 20:01:19  grichenk
  538. * Added methods to support CBioseq_CI
  539. *
  540. * Revision 1.27  2002/08/09 14:59:00  ucko
  541. * Restrict template <> to MIPSpro for now, as it also leads to link
  542. * errors with Compaq's compiler.  (Sigh.)
  543. *
  544. * Revision 1.26  2002/08/08 19:51:24  ucko
  545. * Omit EMPTY_TEMPLATE for GCC and KCC, as it evidently leads to link errors(!)
  546. *
  547. * Revision 1.25  2002/08/08 14:28:00  ucko
  548. * Add EMPTY_TEMPLATE to explicit instantiations.
  549. *
  550. * Revision 1.24  2002/08/07 18:21:57  ucko
  551. * Explicitly instantiate CMutexPool_Base<CScope>::sm_Pool
  552. *
  553. * Revision 1.23  2002/07/08 20:51:02  grichenk
  554. * Moved log to the end of file
  555. * Replaced static mutex (in CScope, CDataSource) with the mutex
  556. * pool. Redesigned CDataSource data locking.
  557. *
  558. * Revision 1.22  2002/06/04 17:18:33  kimelman
  559. * memory cleanup :  new/delete/Cref rearrangements
  560. *
  561. * Revision 1.21  2002/05/28 18:00:43  gouriano
  562. * DebugDump added
  563. *
  564. * Revision 1.20  2002/05/14 20:06:26  grichenk
  565. * Improved CTSE_Info locking by CDataSource and CDataLoader
  566. *
  567. * Revision 1.19  2002/05/06 03:28:47  vakatov
  568. * OM/OM1 renaming
  569. *
  570. * Revision 1.18  2002/04/22 20:04:39  grichenk
  571. * Fixed TSE dropping, removed commented code
  572. *
  573. * Revision 1.17  2002/04/17 21:09:40  grichenk
  574. * Fixed annotations loading
  575. *
  576. * Revision 1.16  2002/03/28 14:02:31  grichenk
  577. * Added scope history checks to CDataSource::x_FindBestTSE()
  578. *
  579. * Revision 1.15  2002/03/27 18:45:44  gouriano
  580. * three functions made public
  581. *
  582. * Revision 1.14  2002/03/20 21:20:39  grichenk
  583. * +CScope::ResetHistory()
  584. *
  585. * Revision 1.13  2002/02/28 20:53:32  grichenk
  586. * Implemented attaching segmented sequence data. Fixed minor bugs.
  587. *
  588. * Revision 1.12  2002/02/25 21:05:29  grichenk
  589. * Removed seq-data references caching. Increased MT-safety. Fixed typos.
  590. *
  591. * Revision 1.11  2002/02/21 19:27:06  grichenk
  592. * Rearranged includes. Added scope history. Added searching for the
  593. * best seq-id match in data sources and scopes. Updated tests.
  594. *
  595. * Revision 1.10  2002/02/07 21:27:35  grichenk
  596. * Redesigned CDataSource indexing: seq-id handle -> TSE -> seq/annot
  597. *
  598. * Revision 1.9  2002/02/06 21:46:11  gouriano
  599. * *** empty log message ***
  600. *
  601. * Revision 1.8  2002/02/05 21:46:28  gouriano
  602. * added FindSeqid function, minor tuneup in CSeq_id_mapper
  603. *
  604. * Revision 1.7  2002/01/29 17:45:34  grichenk
  605. * Removed debug output
  606. *
  607. * Revision 1.6  2002/01/28 19:44:49  gouriano
  608. * changed the interface of BioseqHandle: two functions moved from Scope
  609. *
  610. * Revision 1.5  2002/01/23 21:59:31  grichenk
  611. * Redesigned seq-id handles and mapper
  612. *
  613. * Revision 1.4  2002/01/18 17:06:29  gouriano
  614. * renamed CScope::GetSequence to CScope::GetSeqVector
  615. *
  616. * Revision 1.3  2002/01/18 15:54:14  gouriano
  617. * changed DropTopLevelSeqEntry()
  618. *
  619. * Revision 1.2  2002/01/16 16:25:57  gouriano
  620. * restructured objmgr
  621. *
  622. * Revision 1.1  2002/01/11 19:06:22  gouriano
  623. * restructured objmgr
  624. *
  625. *
  626. * ===========================================================================
  627. */