CSeqMap_CI Class Reference
[Iterators]

Search Toolkit Book for CSeqMap_CI

#include <seq_map_ci.hpp>

Collaboration diagram for CSeqMap_CI:

Collaboration graph
[legend]
List of all members.

Detailed Description

Iterator over CSeqMap.

Definition at line 240 of file seq_map_ci.hpp.

Public Types

typedef SSeqMapSelector::TFlags TFlags

Public Member Functions

 CSeqMap_CI (void)
 CSeqMap_CI (const CBioseq_Handle &bioseq, const SSeqMapSelector &selector, TSeqPos pos=0)
 CSeqMap_CI (const CBioseq_Handle &bioseq, const SSeqMapSelector &selector, const CRange< TSeqPos > &range)
 CSeqMap_CI (const CConstRef< CSeqMap > &seqmap, CScope *scope, const SSeqMapSelector &selector, TSeqPos pos=0)
 CSeqMap_CI (const CConstRef< CSeqMap > &seqmap, CScope *scope, const SSeqMapSelector &selector, const CRange< TSeqPos > &range)
 ~CSeqMap_CI (void)
bool IsInvalid (void) const
bool IsValid (void) const
 DECLARE_OPERATOR_BOOL (IsValid())
bool operator== (const CSeqMap_CI &seg) const
bool operator!= (const CSeqMap_CI &seg) const
bool operator< (const CSeqMap_CI &seg) const
bool operator> (const CSeqMap_CI &seg) const
bool operator<= (const CSeqMap_CI &seg) const
bool operator>= (const CSeqMap_CI &seg) const
bool Next (bool resolveExternal=true)
 go to next/next segment, return false if no more segments if no_resolve_current == true, do not resolve current segment
bool Prev (void)
TFlags GetFlags (void) const
void SetFlags (TFlags flags)
CSeqMap_CIoperator++ (void)
CSeqMap_CIoperator-- (void)
TSeqPos GetPosition (void) const
 return position of current segment in sequence
TSeqPos GetLength (void) const
 return length of current segment
bool IsUnknownLength (void) const
 return true if current segment is a gap of unknown length
TSeqPos GetEndPosition (void) const
 return end position of current segment in sequence (exclusive)
CSeqMap::ESegmentType GetType (void) const
bool IsSetData (void) const
const CSeq_dataGetData (void) const
 will allow only regular data segments (whole, plus strand)
const CSeq_dataGetRefData (void) const
 will allow any data segments, user should check for position and strand
CSeq_id_Handle GetRefSeqid (void) const
 The following function makes sense only when the segment is a reference to another seq.
TSeqPos GetRefPosition (void) const
TSeqPos GetRefEndPosition (void) const
bool GetRefMinusStrand (void) const
CScopeGetScope (void) const
const CTSE_HandleGetUsingTSE (void) const

Private Types

typedef CSeqMap_CI_SegmentInfo TSegmentInfo
typedef vector< TSegmentInfoTStack

Private Member Functions

 CSeqMap_CI (const CSeqMap_CI &base, const CSeqMap &seqmap, size_t index, TSeqPos pos)
const TSegmentInfox_GetSegmentInfo (void) const
TSegmentInfox_GetSegmentInfo (void)
bool x_RefTSEMatch (const CSeqMap::CSegment &seg) const
bool x_CanResolve (const CSeqMap::CSegment &seg) const
const CSeqMapx_GetSeqMap (void) const
size_t x_GetIndex (void) const
const CSeqMap::CSegmentx_GetSegment (void) const
TSeqPos x_GetTopOffset (void) const
void x_Resolve (TSeqPos pos)
bool x_Found (void) const
bool x_Push (TSeqPos offset, bool resolveExternal)
bool x_Push (TSeqPos offset)
void x_Push (const CConstRef< CSeqMap > &seqMap, const CTSE_Handle &tse, TSeqPos from, TSeqPos length, bool minusStrand, TSeqPos pos)
bool x_Pop (void)
bool x_Next (bool resolveExternal)
bool x_Next (void)
bool x_Prev (void)
bool x_TopNext (void)
bool x_TopPrev (void)
bool x_SettleNext (TSeqPos end_pos=kInvalidSeqPos)
bool x_SettlePrev (void)
void x_Select (const CConstRef< CSeqMap > &seqMap, const SSeqMapSelector &selector, TSeqPos pos, TSeqPos end_pos)

Private Attributes

CHeapScope m_Scope
TStack m_Stack
SSeqMapSelector m_Selector

Friends

class CSeqMap


Member Typedef Documentation

typedef SSeqMapSelector::TFlags CSeqMap_CI::TFlags
 

Definition at line 243 of file seq_map_ci.hpp.

typedef CSeqMap_CI_SegmentInfo CSeqMap_CI::TSegmentInfo [private]
 

Definition at line 315 of file seq_map_ci.hpp.

typedef vector<TSegmentInfo> CSeqMap_CI::TStack [private]
 

Definition at line 360 of file seq_map_ci.hpp.


Constructor & Destructor Documentation

CSeqMap_CI::CSeqMap_CI void   ) 
 

Definition at line 137 of file seq_map_ci.cpp.

References kInvalidSeqPos, m_Selector, and SSeqMapSelector::SetPosition().

CSeqMap_CI::CSeqMap_CI const CBioseq_Handle bioseq,
const SSeqMapSelector selector,
TSeqPos  pos = 0
 

Definition at line 163 of file seq_map_ci.cpp.

References ConstRef(), CBioseq_Handle::GetSeqMap(), CBioseq_Handle::GetTSE_Handle(), kInvalidSeqPos, SSeqMapSelector::SetLinkUsedTSE(), and x_Select().

CSeqMap_CI::CSeqMap_CI const CBioseq_Handle bioseq,
const SSeqMapSelector selector,
const CRange< TSeqPos > &  range
 

Definition at line 174 of file seq_map_ci.cpp.

References ConstRef(), COpenRange< Position >::GetFrom(), CBioseq_Handle::GetSeqMap(), COpenRange< Position >::GetToOpen(), CBioseq_Handle::GetTSE_Handle(), SSeqMapSelector::SetLinkUsedTSE(), and x_Select().

CSeqMap_CI::CSeqMap_CI const CConstRef< CSeqMap > &  seqmap,
CScope scope,
const SSeqMapSelector selector,
TSeqPos  pos = 0
 

Definition at line 143 of file seq_map_ci.cpp.

References kInvalidSeqPos, and x_Select().

CSeqMap_CI::CSeqMap_CI const CConstRef< CSeqMap > &  seqmap,
CScope scope,
const SSeqMapSelector selector,
const CRange< TSeqPos > &  range
 

Definition at line 153 of file seq_map_ci.cpp.

References COpenRange< Position >::GetFrom(), COpenRange< Position >::GetToOpen(), and x_Select().

CSeqMap_CI::~CSeqMap_CI void   ) 
 

Definition at line 212 of file seq_map_ci.cpp.

CSeqMap_CI::CSeqMap_CI const CSeqMap_CI base,
const CSeqMap seqmap,
size_t  index,
TSeqPos  pos
[private]
 

Definition at line 186 of file seq_map_ci.cpp.

References NCBI_THROW, CSeqMap_CI_SegmentInfo::x_GetIndex(), x_GetSegmentInfo(), and CSeqMap_CI_SegmentInfo::x_GetSeqMap().


Member Function Documentation

CSeqMap_CI::DECLARE_OPERATOR_BOOL IsValid()   ) 
 

const CSeq_data & CSeqMap_CI::GetData void   )  const
 

will allow only regular data segments (whole, plus strand)

Definition at line 248 of file seq_map_ci.cpp.

References GetRefData(), GetRefMinusStrand(), GetRefPosition(), and NCBI_THROW.

Referenced by GetGapType(), and GetLinkage().

const CSeq_data & CSeqMap_CI::GetRefData void   )  const
 

will allow any data segments, user should check for position and strand

Definition at line 263 of file seq_map_ci.cpp.

References NCBI_THROW, x_GetSegment(), CSeqMap::x_GetSeq_data(), and x_GetSeqMap().

Referenced by GetData(), and CSeqVector_CI::x_FillCache().

CSeq_id_Handle CSeqMap_CI::GetRefSeqid void   )  const
 

The following function makes sense only when the segment is a reference to another seq.

Definition at line 283 of file seq_map_ci.cpp.

References CSeq_id_Handle::GetHandle(), NCBI_THROW, x_GetSegment(), and x_GetSeqMap().

Referenced by CBioseq_Handle::ContainsSegment(), CFlatGatherer::x_DoMultipleSections(), x_GetSwitchPoint(), CSeq_loc_Mapper::x_InitializeSeqMap(), CAnnot_Collector::x_SearchMapped(), and CMasterContext::x_SetBaseName().

bool CSeqMap_CI::IsUnknownLength void   )  const
 

return true if current segment is a gap of unknown length

Definition at line 273 of file seq_map_ci.cpp.

References CSeqMap::CSegment::m_UnknownLength, NCBI_THROW, and x_GetSegment().

Referenced by s_NewGapItem().

bool CSeqMap_CI::Next bool  resolveExternal = true  ) 
 

go to next/next segment, return false if no more segments if no_resolve_current == true, do not resolve current segment

Definition at line 625 of file seq_map_ci.cpp.

References SSeqMapSelector::CanResolve(), m_Selector, x_Next(), and x_SettleNext().

Referenced by operator++().

bool CSeqMap_CI::Prev void   ) 
 

Definition at line 632 of file seq_map_ci.cpp.

References x_Prev(), and x_SettlePrev().

Referenced by operator--().

void CSeqMap_CI::SetFlags TFlags  flags  ) 
 

Definition at line 638 of file seq_map_ci.cpp.

References m_Selector, and SSeqMapSelector::SetFlags().

bool CSeqMap_CI::x_CanResolve const CSeqMap::CSegment seg  )  const [inline, private]
 

Definition at line 343 of file seq_map_ci.cpp.

References SSeqMapSelector::CanResolve(), m_Selector, SSeqMapSelector::x_HasLimitTSE(), and x_RefTSEMatch().

bool CSeqMap_CI::x_Found void   )  const [private]
 

Definition at line 565 of file seq_map_ci.cpp.

References CSeqMap::fFindExactLevel, GetFlags(), SSeqMapSelector::GetResolveCount(), and m_Selector.

Referenced by x_Select(), x_SettleNext(), and x_SettlePrev().

TSeqPos CSeqMap_CI::x_GetTopOffset void   )  const [private]
 

Definition at line 326 of file seq_map_ci.cpp.

References x_GetSegmentInfo(), and CSeqMap_CI_SegmentInfo::x_GetTopOffset().

bool CSeqMap_CI::x_Next void   )  [inline, private]
 

Definition at line 536 of file seq_map_ci.cpp.

References SSeqMapSelector::CanResolve(), and m_Selector.

Referenced by Next(), and x_SettleNext().

bool CSeqMap_CI::x_Next bool  resolveExternal  )  [private]
 

Definition at line 542 of file seq_map_ci.cpp.

References x_Pop(), x_Push(), and x_TopNext().

bool CSeqMap_CI::x_Pop void   )  [private]
 

Definition at line 489 of file seq_map_ci.cpp.

References m_Stack.

Referenced by x_Next(), and x_Prev().

bool CSeqMap_CI::x_Prev void   )  [private]
 

Definition at line 555 of file seq_map_ci.cpp.

References SSeqMapSelector::m_Length, m_Selector, x_Pop(), x_Push(), and x_TopPrev().

Referenced by Prev(), and x_SettlePrev().

void CSeqMap_CI::x_Push const CConstRef< CSeqMap > &  seqMap,
const CTSE_Handle tse,
TSeqPos  from,
TSeqPos  length,
bool  minusStrand,
TSeqPos  pos
[private]
 

Definition at line 433 of file seq_map_ci.cpp.

References _ASSERT, GetScope(), CSeqMap_CI_SegmentInfo::m_Index, CSeqMap_CI_SegmentInfo::m_LevelRangeEnd, CSeqMap_CI_SegmentInfo::m_LevelRangePos, CSeqMap_CI_SegmentInfo::m_MinusStrand, CSeqMap_CI_SegmentInfo::m_SeqMap, CSeqMap_CI_SegmentInfo::m_TSE, and NCBI_THROW.

bool CSeqMap_CI::x_Push TSeqPos  offset  )  [inline, private]
 

Definition at line 131 of file seq_map_ci.cpp.

References SSeqMapSelector::CanResolve(), m_Selector, and x_Push().

bool CSeqMap_CI::x_Push TSeqPos  offset,
bool  resolveExternal
[private]
 

Definition at line 350 of file seq_map_ci.cpp.

References CSeqMap_CI_SegmentInfo::InRange(), and x_GetSegmentInfo().

Referenced by x_Next(), x_Prev(), x_Push(), and x_Select().

bool CSeqMap_CI::x_RefTSEMatch const CSeqMap::CSegment seg  )  const [private]
 

Definition at line 332 of file seq_map_ci.cpp.

References _ASSERT, CSeqMap::eSeqRef, CTSE_Handle::GetBioseqHandle(), CSeq_id_Handle::GetHandle(), GetScope(), CSeqMap::CSegment::m_SegType, m_Selector, SSeqMapSelector::x_GetLimitTSE(), x_GetSeqMap(), and SSeqMapSelector::x_HasLimitTSE().

Referenced by x_CanResolve().

void CSeqMap_CI::x_Resolve TSeqPos  pos  )  [private]
 

void CSeqMap_CI::x_Select const CConstRef< CSeqMap > &  seqMap,
const SSeqMapSelector selector,
TSeqPos  pos,
TSeqPos  end_pos
[private]
 

Definition at line 217 of file seq_map_ci.cpp.

References GetPosition(), GetScope(), kInvalidSeqPos, len, SSeqMapSelector::m_Length, SSeqMapSelector::m_MinusStrand, SSeqMapSelector::m_Position, m_Selector, SSeqMapSelector::m_TopTSE, x_Found(), x_Push(), and x_SettleNext().

Referenced by CSeqMap_CI().

bool CSeqMap_CI::x_SettleNext TSeqPos  end_pos = kInvalidSeqPos  )  [private]
 

Definition at line 605 of file seq_map_ci.cpp.

References GetPosition(), x_Found(), and x_Next().

Referenced by Next(), and x_Select().

bool CSeqMap_CI::x_SettlePrev void   )  [private]
 

Definition at line 615 of file seq_map_ci.cpp.

References x_Found(), and x_Prev().

Referenced by Prev().

bool CSeqMap_CI::x_TopNext void   )  [private]
 

Definition at line 505 of file seq_map_ci.cpp.

References GetScope(), SSeqMapSelector::m_Length, CSeqMap_CI_SegmentInfo::m_MinusStrand, SSeqMapSelector::m_Position, m_Selector, x_GetSegmentInfo(), and CSeqMap_CI_SegmentInfo::x_Move().

Referenced by x_Next().

bool CSeqMap_CI::x_TopPrev void   )  [private]
 

Definition at line 520 of file seq_map_ci.cpp.

References GetScope(), SSeqMapSelector::m_Length, CSeqMap_CI_SegmentInfo::m_MinusStrand, m_Selector, x_GetSegmentInfo(), and CSeqMap_CI_SegmentInfo::x_Move().

Referenced by x_Prev().


Friends And Related Function Documentation

friend class CSeqMap [friend]
 

Definition at line 314 of file seq_map_ci.hpp.


Member Data Documentation

CHeapScope CSeqMap_CI::m_Scope [private]
 

Definition at line 363 of file seq_map_ci.hpp.

Referenced by GetScope().

SSeqMapSelector CSeqMap_CI::m_Selector [private]
 

Definition at line 367 of file seq_map_ci.hpp.

Referenced by CSeqMap::CanResolveRange(), CSeqMap_CI(), GetEndPosition(), GetFlags(), GetLength(), GetPosition(), Next(), SetFlags(), x_CanResolve(), x_Found(), x_Next(), x_Prev(), x_Push(), x_RefTSEMatch(), x_Select(), x_TopNext(), and x_TopPrev().

TStack CSeqMap_CI::m_Stack [private]
 

Definition at line 365 of file seq_map_ci.hpp.

Referenced by IsInvalid(), IsValid(), operator<(), operator==(), operator>(), x_GetSegmentInfo(), and x_Pop().


The documentation for this class was generated from the following files:
Generated on Wed Dec 9 08:08:24 2009 for NCBI C++ ToolKit by  doxygen 1.4.6
Modified on Wed Dec 09 08:19:56 2009 by modify_doxy.py rev. 173732