NCBI C++ ToolKit
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
CSparse_CI Class Reference

Search Toolkit Book for CSparse_CI

Implementation of IAlnSegmentIterator for CSparseAln. More...

#include <objtools/alnmgr/sparse_ci.hpp>

+ Inheritance diagram for CSparse_CI:
+ Collaboration diagram for CSparse_CI:

Public Types

typedef CPairwise_CI::TSignedRange TSignedRange
 
typedef CSparseAln::TDim TDim
 
- Public Types inherited from IAlnSegmentIterator
enum  EFlags { eAllSegments , eSkipGaps , eInsertsOnly , eSkipInserts }
 Iterator options. More...
 
typedef IAlnSegment value_type
 

Public Member Functions

 CSparse_CI (void)
 Create 'empty' iterator. More...
 
 CSparse_CI (const CSparseAln &aln, TDim row, EFlags flags)
 Iterate the specified row of the alignment. More...
 
 CSparse_CI (const CSparseAln &aln, TDim row, EFlags flags, const TSignedRange &range)
 Iterate the selected range on the alignment row. More...
 
 CSparse_CI (const CSparse_CI &orig)
 
virtual ~CSparse_CI (void)
 
virtual IAlnSegmentIteratorClone (void) const
 Create a copy of the iterator. More...
 
virtual operator bool (void) const
 Return true if iterator points to a valid segment. More...
 
virtual IAlnSegmentIteratoroperator++ (void)
 Advance to the next segment. More...
 
virtual bool operator== (const IAlnSegmentIterator &it) const
 Compare iterators. More...
 
virtual bool operator!= (const IAlnSegmentIterator &it) const
 
virtual const value_typeoperator* (void) const
 
virtual const value_typeoperator-> (void) const
 
bool IsAnchorDirect (void) const
 Check if the anchor row coordinates are on plus strand. More...
 
- Public Member Functions inherited from IAlnSegmentIterator
virtual ~IAlnSegmentIterator (void)
 

Private Member Functions

void x_InitIterator (void)
 
void x_InitSegment (void)
 CSparse_CI. More...
 
void x_CheckSegment (void)
 
void x_NextSegment (void)
 
bool x_Equals (const CSparse_CI &other) const
 

Private Attributes

EFlags m_Flags
 
CSparseSegment m_Segment
 
CConstRef< CAnchoredAlnm_Aln
 
TDim m_Row
 
TSignedRange m_TotalRange
 
CPairwise_CI m_AnchorIt
 
CPairwise_CI m_RowIt
 
TSignedRange m_NextAnchorRg
 
TSignedRange m_NextRowRg
 
bool m_AnchorDirect
 
bool m_RowDirect
 

Detailed Description

Implementation of IAlnSegmentIterator for CSparseAln.

Definition at line 72 of file sparse_ci.hpp.

Member Typedef Documentation

◆ TDim

Definition at line 76 of file sparse_ci.hpp.

◆ TSignedRange

Definition at line 75 of file sparse_ci.hpp.

Constructor & Destructor Documentation

◆ CSparse_CI() [1/4]

CSparse_CI::CSparse_CI ( void  )

◆ CSparse_CI() [2/4]

CSparse_CI::CSparse_CI ( const CSparseAln aln,
TDim  row,
EFlags  flags 
)

Iterate the specified row of the alignment.

Definition at line 356 of file sparse_ci.cpp.

References x_InitIterator().

◆ CSparse_CI() [3/4]

CSparse_CI::CSparse_CI ( const CSparseAln aln,
TDim  row,
EFlags  flags,
const TSignedRange range 
)

Iterate the selected range on the alignment row.

Definition at line 370 of file sparse_ci.cpp.

References x_InitIterator().

◆ CSparse_CI() [4/4]

CSparse_CI::CSparse_CI ( const CSparse_CI orig)

Definition at line 385 of file sparse_ci.cpp.

References orig.

◆ ~CSparse_CI()

CSparse_CI::~CSparse_CI ( void  )
virtual

Definition at line 391 of file sparse_ci.cpp.

Member Function Documentation

◆ Clone()

IAlnSegmentIterator * CSparse_CI::Clone ( void  ) const
virtual

Create a copy of the iterator.

Implements IAlnSegmentIterator.

Definition at line 396 of file sparse_ci.cpp.

References CSparse_CI().

◆ IsAnchorDirect()

bool CSparse_CI::IsAnchorDirect ( void  ) const
inline

Check if the anchor row coordinates are on plus strand.

Definition at line 112 of file sparse_ci.hpp.

References m_AnchorDirect.

◆ operator bool()

CSparse_CI::operator bool ( void  ) const
virtual

Return true if iterator points to a valid segment.

Implements IAlnSegmentIterator.

Definition at line 402 of file sparse_ci.cpp.

◆ operator!=()

bool CSparse_CI::operator!= ( const IAlnSegmentIterator it) const
virtual

Implements IAlnSegmentIterator.

Definition at line 426 of file sparse_ci.cpp.

References x_Equals().

◆ operator*()

const CSparse_CI::value_type & CSparse_CI::operator* ( void  ) const
virtual

Implements IAlnSegmentIterator.

Definition at line 436 of file sparse_ci.cpp.

References _ASSERT, and m_Segment.

◆ operator++()

IAlnSegmentIterator & CSparse_CI::operator++ ( void  )
virtual

Advance to the next segment.

Implements IAlnSegmentIterator.

Definition at line 408 of file sparse_ci.cpp.

References x_CheckSegment(), and x_NextSegment().

◆ operator->()

const CSparse_CI::value_type * CSparse_CI::operator-> ( void  ) const
virtual

Implements IAlnSegmentIterator.

Definition at line 443 of file sparse_ci.cpp.

References _ASSERT, and m_Segment.

◆ operator==()

bool CSparse_CI::operator== ( const IAlnSegmentIterator it) const
virtual

Compare iterators.

Implements IAlnSegmentIterator.

Definition at line 416 of file sparse_ci.cpp.

References x_Equals().

◆ x_CheckSegment()

void CSparse_CI::x_CheckSegment ( void  )
private

◆ x_Equals()

bool CSparse_CI::x_Equals ( const CSparse_CI other) const
private

Definition at line 329 of file sparse_ci.cpp.

References m_Aln, m_AnchorIt, m_Flags, m_NextAnchorRg, m_NextRowRg, m_Row, m_RowIt, m_Segment, and m_TotalRange.

Referenced by operator!=(), and operator==().

◆ x_InitIterator()

void CSparse_CI::x_InitIterator ( void  )
private

◆ x_InitSegment()

void CSparse_CI::x_InitSegment ( void  )
private

◆ x_NextSegment()

void CSparse_CI::x_NextSegment ( void  )
private

Member Data Documentation

◆ m_Aln

CConstRef<CAnchoredAln> CSparse_CI::m_Aln
private

Definition at line 123 of file sparse_ci.hpp.

Referenced by x_Equals(), x_InitIterator(), and x_InitSegment().

◆ m_AnchorDirect

bool CSparse_CI::m_AnchorDirect
private

Definition at line 130 of file sparse_ci.hpp.

Referenced by IsAnchorDirect(), and x_InitSegment().

◆ m_AnchorIt

CPairwise_CI CSparse_CI::m_AnchorIt
private

Definition at line 126 of file sparse_ci.hpp.

Referenced by x_Equals(), x_InitIterator(), x_InitSegment(), and x_NextSegment().

◆ m_Flags

EFlags CSparse_CI::m_Flags
private

Definition at line 121 of file sparse_ci.hpp.

Referenced by x_CheckSegment(), and x_Equals().

◆ m_NextAnchorRg

TSignedRange CSparse_CI::m_NextAnchorRg
private

Definition at line 128 of file sparse_ci.hpp.

Referenced by x_Equals(), x_InitIterator(), x_InitSegment(), and x_NextSegment().

◆ m_NextRowRg

TSignedRange CSparse_CI::m_NextRowRg
private

Definition at line 129 of file sparse_ci.hpp.

Referenced by x_Equals(), x_InitIterator(), x_InitSegment(), and x_NextSegment().

◆ m_Row

TDim CSparse_CI::m_Row
private

Definition at line 124 of file sparse_ci.hpp.

Referenced by x_Equals(), and x_InitIterator().

◆ m_RowDirect

bool CSparse_CI::m_RowDirect
private

Definition at line 131 of file sparse_ci.hpp.

Referenced by x_InitSegment().

◆ m_RowIt

CPairwise_CI CSparse_CI::m_RowIt
private

Definition at line 127 of file sparse_ci.hpp.

Referenced by x_Equals(), x_InitIterator(), x_InitSegment(), and x_NextSegment().

◆ m_Segment

CSparseSegment CSparse_CI::m_Segment
private

◆ m_TotalRange

TSignedRange CSparse_CI::m_TotalRange
private

Definition at line 125 of file sparse_ci.hpp.

Referenced by x_Equals(), and x_InitIterator().


The documentation for this class was generated from the following files:
Modified on Fri Sep 20 14:58:20 2024 by modify_doxy.py rev. 669887