📄 annot_ci.hpp
字号:
/* * =========================================================================== * PRODUCTION $Log: annot_ci.hpp,v $ * PRODUCTION Revision 1000.1 2004/04/12 17:26:54 gouriano * PRODUCTION PRODUCTION: UPGRADED [CATCHUP_003] Dev-tree R1.27 * PRODUCTION * =========================================================================== */#ifndef ANNOT_CI__HPP#define ANNOT_CI__HPP/* $Id: annot_ci.hpp,v 1000.1 2004/04/12 17:26:54 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.** ===========================================================================** Author: Aleksey Grichenko, Michael Kimelman, Eugene Vasilchenko** File Description:* Object manager iterators**/#include <objmgr/annot_types_ci.hpp>#include <objmgr/seq_annot_ci.hpp>#include <corelib/ncbistd.hpp>BEGIN_NCBI_SCOPEBEGIN_SCOPE(objects)class NCBI_XOBJMGR_EXPORT CAnnot_CI : public CAnnotTypes_CI{public: CAnnot_CI(void); CAnnot_CI(CScope& scope, const CSeq_loc& loc, const SAnnotSelector& sel); CAnnot_CI(const CBioseq_Handle& bioseq, TSeqPos start, TSeqPos stop, const SAnnotSelector& sel); // Search all TSEs in all datasources CAnnot_CI(CScope& scope, const CSeq_loc& loc, SAnnotSelector::EOverlapType overlap_type = SAnnotSelector::eOverlap_Intervals, SAnnotSelector::EResolveMethod resolve = SAnnotSelector::eResolve_TSE); // Search only in TSE, containing the bioseq CAnnot_CI(const CBioseq_Handle& bioseq, TSeqPos start, TSeqPos stop, SAnnotSelector::EOverlapType overlap_type = SAnnotSelector::eOverlap_Intervals, SAnnotSelector::EResolveMethod resolve = SAnnotSelector::eResolve_TSE); // Iterate all features from the object regardless of their location CAnnot_CI(const CAnnot_CI& iter); virtual ~CAnnot_CI(void); CAnnot_CI& operator= (const CAnnot_CI& iter); CAnnot_CI& operator++ (void); CAnnot_CI& operator-- (void); operator bool (void) const; CSeq_annot_Handle& operator*(void) const; CSeq_annot_Handle* operator->(void) const;private: void x_Collect(void); CAnnot_CI operator++ (int); CAnnot_CI operator-- (int); typedef set<CSeq_annot_Handle> TSeqAnnotSet; typedef TSeqAnnotSet::iterator TIterator; mutable TSeqAnnotSet m_SeqAnnotSet; TIterator m_Iterator; mutable CSeq_annot_Handle m_Value;};inlineCAnnot_CI& CAnnot_CI::operator++ (void){ _ASSERT(m_Iterator != m_SeqAnnotSet.end()); ++m_Iterator; return *this;}inlineCAnnot_CI& CAnnot_CI::operator-- (void){ _ASSERT(m_Iterator != m_SeqAnnotSet.begin()); --m_Iterator; return *this;}inlineCAnnot_CI::operator bool (void) const{ return m_Iterator != m_SeqAnnotSet.end();}inlineCSeq_annot_Handle& CAnnot_CI::operator*(void) const{ _ASSERT(*this); return m_Value = *m_Iterator;}inlineCSeq_annot_Handle* CAnnot_CI::operator->(void) const{ _ASSERT(*this); m_Value = *m_Iterator; return &m_Value;}END_SCOPE(objects)END_NCBI_SCOPE/** ---------------------------------------------------------------------------* $Log: annot_ci.hpp,v $* Revision 1000.1 2004/04/12 17:26:54 gouriano* PRODUCTION: UPGRADED [CATCHUP_003] Dev-tree R1.27** Revision 1.27 2004/04/05 15:56:13 grichenk* Redesigned CAnnotTypes_CI: moved all data and data collecting* functions to CAnnotDataCollector. CAnnotTypes_CI is no more* inherited from SAnnotSelector.** Revision 1.26 2004/03/16 15:47:25 vasilche* Added CBioseq_set_Handle and set of EditHandles** Revision 1.25 2004/02/04 18:05:31 grichenk* Added annotation filtering by set of types/subtypes.* Renamed *Choice to *Type in SAnnotSelector.** Revision 1.24 2003/10/09 12:29:52 dicuccio* Added missing 'public' in inheritance** Revision 1.23 2003/09/11 17:45:06 grichenk* Added adaptive-depth option to annot-iterators.** Revision 1.22 2003/08/27 21:08:03 grichenk* CAnnotTypes_CI made private** Revision 1.21 2003/08/22 15:00:47 grichenk* Redesigned CAnnot_CI to iterate over seq-annots, containing* given location.** Revision 1.20 2003/08/15 15:21:58 grichenk* Initial revision*** ===========================================================================*/#endif // ANNOT_CI__HPP
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -