heap_scope.cpp

来自「ncbi源码」· C++ 代码 · 共 467 行 · 第 1/2 页

CPP
467
字号
/* * =========================================================================== * PRODUCTION $Log: heap_scope.cpp,v $ * PRODUCTION Revision 1000.1  2004/06/01 19:23:24  gouriano * PRODUCTION PRODUCTION: UPGRADED [GCC34_MSVC7] Dev-tree R1.3 * PRODUCTION * =========================================================================== *//*  $Id: heap_scope.cpp,v 1000.1 2004/06/01 19:23:24 gouriano Exp $* ===========================================================================**                            PUBLIC DOMAIN NOTICE*               National Center for Biotechnology Information**  This software/database is a "United States Government Work" under the*  terms of the United States Copyright Act.  It was written as part of*  the author's official duties as a United States Government employee and*  thus cannot be copyrighted.  This software/database is freely available*  to the public for use. The National Library of Medicine and the U.S.*  Government have not placed any restriction on its use or reproduction.**  Although all reasonable efforts have been taken to ensure the accuracy*  and reliability of the software and data, the NLM and the U.S.*  Government do not and cannot warrant the performance or results that*  may be obtained by using this software or data. The NLM and the U.S.*  Government disclaim all warranties, express or implied, including*  warranties of performance, merchantability or fitness for any particular*  purpose.**  Please cite the author in any work or product based on this material.** ===========================================================================** Authors:*           Andrei Gourianov*           Aleksey Grichenko*           Michael Kimelman*           Denis Vakatov*           Eugene Vasilchenko** File Description:*           Scope is top-level object available to a client.*           Its purpose is to define a scope of visibility and reference*           resolution and provide access to the bio sequence data**/#include <ncbi_pch.hpp>#include <objmgr/impl/heap_scope.hpp>#include <objmgr/impl/scope_impl.hpp>#include <objmgr/scope.hpp>BEGIN_NCBI_SCOPEBEGIN_SCOPE(objects)///////////////////////////////////////////////////////////////////////////////// CHeapScope///////////////////////////////////////////////////////////////////////////////void CHeapScope::Set(CScope* scope){    if ( scope ) {        m_Scope.Reset(scope->m_Impl->m_HeapScope);        _ASSERT(m_Scope);    }    else {        m_Scope.Reset();    }}CScope& CHeapScope::GetScope(void) const{    return static_cast<CScope&>(const_cast<CObject&>(*m_Scope));}CScope* CHeapScope::GetScopeOrNull(void) const{    return static_cast<CScope*>        (const_cast<CObject*>(m_Scope.GetPointerOrNull()));}CScope_Impl* CHeapScope::GetImpl(void) const{    return GetScope().m_Impl.GetPointer();}END_SCOPE(objects)END_NCBI_SCOPE/** ---------------------------------------------------------------------------* $Log: heap_scope.cpp,v $* Revision 1000.1  2004/06/01 19:23:24  gouriano* PRODUCTION: UPGRADED [GCC34_MSVC7] Dev-tree R1.3** Revision 1.3  2004/05/21 21:42:12  gorelenk* Added PCH ncbi_pch.hpp** Revision 1.2  2004/04/12 16:49:16  vasilche* Allow null scope in CSeqMap_CI and CSeqVector.** Revision 1.1  2004/03/16 15:47:27  vasilche* Added CBioseq_set_Handle and set of EditHandles** Revision 1.101  2004/02/19 17:23:01  vasilche* Changed order of deletion of heap scope and scope impl objects.* Reduce number of calls to x_ResetHistory().** Revision 1.100  2004/02/10 21:15:16  grichenk* Added reverse ID matching.** Revision 1.99  2004/02/09 14:42:46  vasilche* Temporary fix in GetSynonyms() to get accession without version.** Revision 1.98  2004/02/02 14:46:43  vasilche* Several performance fixed - do not iterate whole tse set in CDataSource.** Revision 1.97  2004/01/29 20:33:28  vasilche* Do not resolve any Seq-ids in CScope::GetSynonyms() -* assume all not resolved Seq-id as synonym.* Seq-id conflict messages made clearer.** Revision 1.96  2004/01/28 20:50:49  vasilche* Fixed NULL pointer exception in GetSynonyms() when matching Seq-id w/o version.** Revision 1.95  2004/01/07 20:42:01  grichenk* Fixed matching of accession to accession.version** Revision 1.94  2003/12/18 16:38:07  grichenk* Added CScope::RemoveEntry()** Revision 1.93  2003/12/12 16:59:51  grichenk* Fixed conflicts resolving (ask data source).** Revision 1.92  2003/12/03 20:55:12  grichenk* Check value returned by x_GetBioseq_Info()** Revision 1.91  2003/11/21 20:33:03  grichenk* Added GetBioseqHandleFromTSE(CSeq_id, CSeq_entry)** Revision 1.90  2003/11/19 22:18:03  grichenk* All exceptions are now CException-derived. Catch "exception" rather* than "runtime_error".** Revision 1.89  2003/11/12 15:49:39  vasilche* Added loading annotations on non gi Seq-id.** Revision 1.88  2003/10/23 13:47:27  vasilche* Check CSeq_id_Handle for null in CScope::GetBioseqHandle().** Revision 1.87  2003/10/22 14:08:15  vasilche* Detach all CBbioseq_Handle objects from scope in CScope::ResetHistory().** Revision 1.86  2003/10/22 13:54:36  vasilche* All CScope::GetBioseqHandle() methods return 'null' CBioseq_Handle object* instead of throwing an exception.** Revision 1.85  2003/10/20 18:23:54  vasilche* Make CScope::GetSynonyms() to skip conflicting ids.** Revision 1.84  2003/10/09 13:58:21  vasilche* Fixed conflict when the same datasource appears twice with equal priorities.** Revision 1.83  2003/10/07 13:43:23  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.82  2003/09/30 16:22:03  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.81  2003/09/05 20:50:26  grichenk* +AddBioseq(CBioseq&)** Revision 1.80  2003/09/05 17:29:40  grichenk* Structurized Object Manager exceptions** Revision 1.79  2003/09/03 20:00:02  grichenk* Added sequence filtering by level (mains/parts/all)** Revision 1.78  2003/08/04 17:03:01  grichenk* Added constructors to iterate all annotations from a* seq-entry or seq-annot.** Revision 1.77  2003/07/25 15:25:25  grichenk* Added CSeq_annot_CI class** Revision 1.76  2003/07/17 20:07:56  vasilche* Reduced memory usage by feature indexes.* SNP data is loaded separately through PUBSEQ_OS.* String compression for SNP data.** Revision 1.75  2003/07/14 21:13:59  grichenk* Added seq-loc dump in GetBioseqHandle(CSeqLoc)** Revision 1.74  2003/06/30 18:42:10  vasilche* CPriority_I made to use less memory allocations/deallocations.** Revision 1.73  2003/06/24 14:25:18  vasilche* Removed obsolete CTSE_Guard class.* Used separate mutexes for bioseq and annot maps.** Revision 1.72  2003/06/19 18:23:46  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.69  2003/05/27 19:44:06  grichenk* Added CSeqVector_CI class** Revision 1.68  2003/05/20 15:44:37  vasilche* Fixed interaction of CDataSource and CDataLoader in multithreaded app.

⌨️ 快捷键说明

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