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

Search Toolkit Book for CHandleRange

#include <objmgr/impl/handle_range.hpp>

+ Collaboration diagram for CHandleRange:

Public Types

enum  ETotalRangeFlags { eStrandPlus = 1 << 0 , eStrandMinus = 1 << 1 , eStrandAny = eStrandPlus | eStrandMinus }
 
typedef CRange< TSeqPosTRange
 
typedef COpenRange< TSeqPosTOpenRange
 
typedef pair< TRange, ENa_strandTRangeWithStrand
 
typedef vector< TRangeWithStrandTRanges
 
typedef TRanges::const_iterator const_iterator
 
typedef unsigned int TTotalRangeFlags
 

Public Member Functions

 CHandleRange (void)
 
 CHandleRange (const CHandleRange &src, const TOpenRange &range)
 Trim src with filter range. More...
 
 ~CHandleRange (void)
 
bool Empty (void) const
 
const_iterator begin (void) const
 
const_iterator end (void) const
 
void AddRange (TRange range, ENa_strand strand)
 
void AddRange (TRange range, ENa_strand strand, bool more_before, bool more_after, bool circular_rna=false)
 
void MergeRange (TRange range, ENa_strand strand)
 
void AddRanges (const CHandleRange &hr)
 
bool HasGaps (void) const
 
bool IsMultipart (void) const
 
bool IsCircular (void) const
 
bool IsSingleStrand (void) const
 
TTotalRangeFlags GetStrandsFlag (void) const
 
TRange GetOverlappingRange (TTotalRangeFlags flags=eStrandAny) const
 
TSeqPos GetLeft (void) const
 
TSeqPos GetRight (void) const
 
TRange GetCircularRangeStart (bool include_origin=true) const
 
TRange GetCircularRangeEnd (bool include_origin=true) const
 
TRange GetOverlappingRange (const TRange &range) const
 
bool IntersectingWith (const CHandleRange &hr) const
 
bool IntersectingWithTotalRange (const CHandleRange &hr) const
 
bool IntersectingWithSubranges (const CHandleRange &hr) const
 
bool IntersectingWith_NoStrand (const CHandleRange &hr) const
 
bool IntersectingWith (const TRange &range, ENa_strand strand=eNa_strand_unknown) const
 

Private Member Functions

bool x_IncludesPlus (const ENa_strand &strand) const
 
bool x_IncludesMinus (const ENa_strand &strand) const
 

Static Private Member Functions

static bool x_IntersectingStrands (ENa_strand str1, ENa_strand str2)
 

Private Attributes

TRanges m_Ranges
 
TRange m_TotalRanges_plus
 
TRange m_TotalRanges_minus
 
bool m_IsCircular
 
bool m_IsSingleStrand
 
bool m_MoreBefore
 
bool m_MoreAfter
 

Friends

class CHandleRangeMap
 

Detailed Description

Definition at line 44 of file handle_range.hpp.

Member Typedef Documentation

◆ const_iterator

typedef TRanges::const_iterator CHandleRange::const_iterator

Definition at line 51 of file handle_range.hpp.

◆ TOpenRange

Definition at line 48 of file handle_range.hpp.

◆ TRange

Definition at line 47 of file handle_range.hpp.

◆ TRanges

Definition at line 50 of file handle_range.hpp.

◆ TRangeWithStrand

Definition at line 49 of file handle_range.hpp.

◆ TTotalRangeFlags

Definition at line 84 of file handle_range.hpp.

Member Enumeration Documentation

◆ ETotalRangeFlags

Enumerator
eStrandPlus 
eStrandMinus 
eStrandAny 

Definition at line 79 of file handle_range.hpp.

Constructor & Destructor Documentation

◆ CHandleRange() [1/2]

CHandleRange::CHandleRange ( void  )

Definition at line 49 of file handle_range.cpp.

◆ CHandleRange() [2/2]

CHandleRange::CHandleRange ( const CHandleRange src,
const TOpenRange range 
)

Trim src with filter range.

Definition at line 60 of file handle_range.cpp.

References AddRange(), and ITERATE.

◆ ~CHandleRange()

CHandleRange::~CHandleRange ( void  )

Definition at line 76 of file handle_range.cpp.

Member Function Documentation

◆ AddRange() [1/2]

void CHandleRange::AddRange ( TRange  range,
ENa_strand  strand 
)

◆ AddRange() [2/2]

void CHandleRange::AddRange ( TRange  range,
ENa_strand  strand,
bool  more_before,
bool  more_after,
bool  circular_rna = false 
)

◆ AddRanges()

void CHandleRange::AddRanges ( const CHandleRange hr)

Definition at line 211 of file handle_range.cpp.

References AddRange(), and ITERATE.

◆ begin()

CHandleRange::const_iterator CHandleRange::begin ( void  ) const
inline

◆ Empty()

bool CHandleRange::Empty ( void  ) const
inline

◆ end()

CHandleRange::const_iterator CHandleRange::end ( void  ) const
inline

Definition at line 157 of file handle_range.hpp.

References m_Ranges.

Referenced by CAnnot_Collector::x_SearchRange().

◆ GetCircularRangeEnd()

CHandleRange::TRange CHandleRange::GetCircularRangeEnd ( bool  include_origin = true) const

◆ GetCircularRangeStart()

CHandleRange::TRange CHandleRange::GetCircularRangeStart ( bool  include_origin = true) const

◆ GetLeft()

TSeqPos CHandleRange::GetLeft ( void  ) const

◆ GetOverlappingRange() [1/2]

CHandleRange::TRange CHandleRange::GetOverlappingRange ( const TRange range) const

◆ GetOverlappingRange() [2/2]

CHandleRange::TRange CHandleRange::GetOverlappingRange ( TTotalRangeFlags  flags = eStrandAny) const

◆ GetRight()

TSeqPos CHandleRange::GetRight ( void  ) const

◆ GetStrandsFlag()

CHandleRange::TTotalRangeFlags CHandleRange::GetStrandsFlag ( void  ) const

◆ HasGaps()

bool CHandleRange::HasGaps ( void  ) const

◆ IntersectingWith() [1/2]

bool CHandleRange::IntersectingWith ( const CHandleRange hr) const

◆ IntersectingWith() [2/2]

bool CHandleRange::IntersectingWith ( const TRange range,
ENa_strand  strand = eNa_strand_unknown 
) const

◆ IntersectingWith_NoStrand()

bool CHandleRange::IntersectingWith_NoStrand ( const CHandleRange hr) const

Definition at line 260 of file handle_range.cpp.

References GetOverlappingRange(), IntersectingWith(), ITERATE, and m_Ranges.

Referenced by CAnnot_Collector::x_MatchRange().

◆ IntersectingWithSubranges()

bool CHandleRange::IntersectingWithSubranges ( const CHandleRange hr) const

Definition at line 239 of file handle_range.cpp.

References ITERATE, m_Ranges, and x_IntersectingStrands().

Referenced by IntersectingWith().

◆ IntersectingWithTotalRange()

bool CHandleRange::IntersectingWithTotalRange ( const CHandleRange hr) const

◆ IsCircular()

bool CHandleRange::IsCircular ( void  ) const
inline

◆ IsMultipart()

bool CHandleRange::IsMultipart ( void  ) const
inline

Definition at line 164 of file handle_range.hpp.

References m_IsCircular, and m_IsSingleStrand.

◆ IsSingleStrand()

bool CHandleRange::IsSingleStrand ( void  ) const
inline

Definition at line 178 of file handle_range.hpp.

References m_IsSingleStrand.

◆ MergeRange()

void CHandleRange::MergeRange ( TRange  range,
ENa_strand  strand 
)

Definition at line 276 of file handle_range.cpp.

References AddRange(), eNa_strand_unknown, m_Ranges, and compile_time_bits::range().

◆ x_IncludesMinus()

bool CHandleRange::x_IncludesMinus ( const ENa_strand strand) const
inlineprivate

◆ x_IncludesPlus()

bool CHandleRange::x_IncludesPlus ( const ENa_strand strand) const
inlineprivate

Definition at line 185 of file handle_range.hpp.

References eNa_strand_minus.

Referenced by AddRange(), GetOverlappingRange(), and GetStrandsFlag().

◆ x_IntersectingStrands()

bool CHandleRange::x_IntersectingStrands ( ENa_strand  str1,
ENa_strand  str2 
)
staticprivate

Definition at line 219 of file handle_range.cpp.

References eNa_strand_unknown.

Referenced by IntersectingWith(), and IntersectingWithSubranges().

Friends And Related Function Documentation

◆ CHandleRangeMap

friend class CHandleRangeMap
friend

Definition at line 138 of file handle_range.hpp.

Member Data Documentation

◆ m_IsCircular

bool CHandleRange::m_IsCircular
private

◆ m_IsSingleStrand

bool CHandleRange::m_IsSingleStrand
private

Definition at line 133 of file handle_range.hpp.

Referenced by AddRange(), GetOverlappingRange(), IsMultipart(), and IsSingleStrand().

◆ m_MoreAfter

bool CHandleRange::m_MoreAfter
private

Definition at line 135 of file handle_range.hpp.

Referenced by AddRange(), GetOverlappingRange(), and HasGaps().

◆ m_MoreBefore

bool CHandleRange::m_MoreBefore
private

◆ m_Ranges

TRanges CHandleRange::m_Ranges
private

◆ m_TotalRanges_minus

TRange CHandleRange::m_TotalRanges_minus
private

◆ m_TotalRanges_plus

TRange CHandleRange::m_TotalRanges_plus
private

The documentation for this class was generated from the following files:
Modified on Sun May 05 05:23:08 2024 by modify_doxy.py rev. 669887