NCBI C++ ToolKit
|
Search Toolkit Book for CHandleRange
#include <objmgr/impl/handle_range.hpp>
Public Types | |
enum | ETotalRangeFlags { eStrandPlus = 1 << 0 , eStrandMinus = 1 << 1 , eStrandAny = eStrandPlus | eStrandMinus } |
typedef CRange< TSeqPos > | TRange |
typedef COpenRange< TSeqPos > | TOpenRange |
typedef pair< TRange, ENa_strand > | TRangeWithStrand |
typedef vector< TRangeWithStrand > | TRanges |
typedef TRanges::const_iterator | const_iterator |
typedef unsigned int | TTotalRangeFlags |
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 |
Definition at line 44 of file handle_range.hpp.
typedef TRanges::const_iterator CHandleRange::const_iterator |
Definition at line 51 of file handle_range.hpp.
typedef COpenRange<TSeqPos> CHandleRange::TOpenRange |
Definition at line 48 of file handle_range.hpp.
typedef CRange<TSeqPos> CHandleRange::TRange |
Definition at line 47 of file handle_range.hpp.
typedef vector<TRangeWithStrand> CHandleRange::TRanges |
Definition at line 50 of file handle_range.hpp.
typedef pair<TRange, ENa_strand> CHandleRange::TRangeWithStrand |
Definition at line 49 of file handle_range.hpp.
typedef unsigned int CHandleRange::TTotalRangeFlags |
Definition at line 84 of file handle_range.hpp.
Enumerator | |
---|---|
eStrandPlus | |
eStrandMinus | |
eStrandAny |
Definition at line 79 of file handle_range.hpp.
CHandleRange::CHandleRange | ( | void | ) |
Definition at line 49 of file handle_range.cpp.
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 | ( | void | ) |
Definition at line 76 of file handle_range.cpp.
void CHandleRange::AddRange | ( | TRange | range, |
ENa_strand | strand | ||
) |
Definition at line 109 of file handle_range.cpp.
References compile_time_bits::range().
Referenced by CHandleRangeMap::AddRange(), AddRanges(), CHandleRange(), MergeRange(), CAnnot_Collector::x_CollectMapped(), CAnnot_Collector::x_Initialize(), and CAnnot_Collector::x_SearchMapped().
void CHandleRange::AddRange | ( | TRange | range, |
ENa_strand | strand, | ||
bool | more_before, | ||
bool | more_after, | ||
bool | circular_rna = false |
||
) |
Definition at line 115 of file handle_range.cpp.
References _ASSERT, COpenRange< Position >::Empty(), COpenRange< TSeqPos >::GetEmpty(), m_IsCircular, m_IsSingleStrand, m_MoreAfter, m_MoreBefore, m_Ranges, m_TotalRanges_minus, m_TotalRanges_plus, NON_CONST_REVERSE_ITERATE, compile_time_bits::range(), x_IncludesMinus(), and x_IncludesPlus().
void CHandleRange::AddRanges | ( | const CHandleRange & | hr | ) |
Definition at line 211 of file handle_range.cpp.
References AddRange(), and ITERATE.
|
inline |
Definition at line 150 of file handle_range.hpp.
References m_Ranges.
Referenced by CAnnot_Collector::x_CollectSegments(), CAnnot_Collector::x_SearchRange(), and CAnnot_Collector::x_SearchSegments().
|
inline |
Definition at line 143 of file handle_range.hpp.
References m_Ranges.
Referenced by CAnnot_Collector::x_CollectMapped(), CAnnot_Collector::x_SearchMapped(), and CAnnot_Collector::x_SearchTSE().
|
inline |
Definition at line 157 of file handle_range.hpp.
References m_Ranges.
Referenced by CAnnot_Collector::x_SearchRange().
CHandleRange::TRange CHandleRange::GetCircularRangeEnd | ( | bool | include_origin = true | ) | const |
Definition at line 398 of file handle_range.cpp.
References _ASSERT, COpenRange< TSeqPos >::GetWholeFrom(), COpenRange< TSeqPos >::GetWholeTo(), IsReverse(), m_IsCircular, m_Ranges, m_TotalRanges_minus, CRange_Base::SetFrom(), and CRange_Base::SetTo().
Referenced by CSeq_annot_Info::x_InitFeatKeys(), CSeq_annot_Info::x_InitFeatTableKeys(), and CSeq_annot_Info::x_MapAnnotObject().
CHandleRange::TRange CHandleRange::GetCircularRangeStart | ( | bool | include_origin = true | ) | const |
Definition at line 378 of file handle_range.cpp.
References _ASSERT, COpenRange< TSeqPos >::GetWholeFrom(), COpenRange< TSeqPos >::GetWholeTo(), IsReverse(), m_IsCircular, m_Ranges, m_TotalRanges_plus, CRange_Base::SetFrom(), and CRange_Base::SetTo().
Referenced by CSeq_annot_Info::x_InitFeatKeys(), CSeq_annot_Info::x_InitFeatTableKeys(), and CSeq_annot_Info::x_MapAnnotObject().
TSeqPos CHandleRange::GetLeft | ( | void | ) | const |
Definition at line 299 of file handle_range.cpp.
References CRange_Base::GetFrom(), IsReverse(), m_IsCircular, m_Ranges, m_TotalRanges_minus, m_TotalRanges_plus, and min().
CHandleRange::TRange CHandleRange::GetOverlappingRange | ( | const TRange & | range | ) | const |
Definition at line 418 of file handle_range.cpp.
References COpenRange< TSeqPos >::GetEmpty(), COpenRange< Position >::IntersectionWith(), ITERATE, m_Ranges, and compile_time_bits::range().
CHandleRange::TRange CHandleRange::GetOverlappingRange | ( | TTotalRangeFlags | flags = eStrandAny | ) | const |
Definition at line 331 of file handle_range.cpp.
References _ASSERT, eStrandMinus, eStrandPlus, flags, COpenRange< TSeqPos >::GetEmpty(), COpenRange< TSeqPos >::GetWhole(), COpenRange< TSeqPos >::GetWholeFrom(), COpenRange< TSeqPos >::GetWholeTo(), IsReverse(), m_IsCircular, m_IsSingleStrand, m_MoreAfter, m_MoreBefore, m_Ranges, m_TotalRanges_minus, m_TotalRanges_plus, CRange_Base::SetFrom(), CRange_Base::SetTo(), x_IncludesMinus(), and x_IncludesPlus().
Referenced by COneSeqRange::Add(), IntersectingWith_NoStrand(), CSeq_annot_Info::x_AddAlignIndex(), CSeq_annot_Info::x_InitFeatKeys(), CSeq_annot_Info::x_InitFeatTableKeys(), CSeq_annot_Info::x_InitGraphKeys(), CSeq_annot_Info::x_InitLocsKeys(), CSeq_annot_Info::x_MapAnnotObject(), CAnnot_Collector::x_SearchObjects(), CAnnot_Collector::x_SearchRange(), and CAnnot_Collector::x_SearchTSE().
TSeqPos CHandleRange::GetRight | ( | void | ) | const |
Definition at line 311 of file handle_range.cpp.
References COpenRange< Position >::Empty(), CRange_Base::GetTo(), IsReverse(), m_IsCircular, m_Ranges, m_TotalRanges_minus, m_TotalRanges_plus, and max().
CHandleRange::TTotalRangeFlags CHandleRange::GetStrandsFlag | ( | void | ) | const |
Definition at line 81 of file handle_range.cpp.
References COpenRange< Position >::Empty(), eStrandMinus, eStrandPlus, m_IsCircular, m_Ranges, m_TotalRanges_minus, m_TotalRanges_plus, x_IncludesMinus(), and x_IncludesPlus().
Referenced by CSeq_annot_Info::x_InitFeatKeys(), CSeq_annot_Info::x_InitFeatTableKeys(), CSeq_annot_Info::x_MapAnnotObject(), and CAnnot_Collector::x_MatchRange().
bool CHandleRange::HasGaps | ( | void | ) | const |
Definition at line 445 of file handle_range.cpp.
References m_MoreAfter, m_MoreBefore, and m_Ranges.
Referenced by CSeq_annot_Info::x_AddAlignIndex(), CSeq_annot_Info::x_InitFeatKeys(), CSeq_annot_Info::x_InitFeatTableKeys(), CSeq_annot_Info::x_InitGraphKeys(), CSeq_annot_Info::x_InitLocsKeys(), and CSeq_annot_Info::x_MapAnnotObject().
bool CHandleRange::IntersectingWith | ( | const CHandleRange & | hr | ) | const |
Definition at line 254 of file handle_range.cpp.
References IntersectingWithSubranges(), and IntersectingWithTotalRange().
Referenced by IntersectingWith_NoStrand(), and CAnnot_Collector::x_MatchRange().
bool CHandleRange::IntersectingWith | ( | const TRange & | range, |
ENa_strand | strand = eNa_strand_unknown |
||
) | const |
Definition at line 430 of file handle_range.cpp.
References ITERATE, m_Ranges, compile_time_bits::range(), and x_IntersectingStrands().
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().
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().
bool CHandleRange::IntersectingWithTotalRange | ( | const CHandleRange & | hr | ) | const |
Definition at line 231 of file handle_range.cpp.
References COpenRange< Position >::IntersectingWith(), IsCircular(), m_TotalRanges_minus, and m_TotalRanges_plus.
Referenced by IntersectingWith(), and CAnnot_Collector::x_SearchTSE().
|
inline |
Definition at line 171 of file handle_range.hpp.
References m_IsCircular.
Referenced by IntersectingWithTotalRange(), CSeq_annot_Info::x_InitFeatKeys(), CSeq_annot_Info::x_InitFeatTableKeys(), and CSeq_annot_Info::x_MapAnnotObject().
|
inline |
Definition at line 164 of file handle_range.hpp.
References m_IsCircular, and m_IsSingleStrand.
|
inline |
Definition at line 178 of file handle_range.hpp.
References m_IsSingleStrand.
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().
|
inlineprivate |
Definition at line 193 of file handle_range.hpp.
References eNa_strand_both, eNa_strand_both_rev, eNa_strand_minus, and eNa_strand_unknown.
Referenced by AddRange(), GetOverlappingRange(), and GetStrandsFlag().
|
inlineprivate |
Definition at line 185 of file handle_range.hpp.
References eNa_strand_minus.
Referenced by AddRange(), GetOverlappingRange(), and GetStrandsFlag().
|
staticprivate |
Definition at line 219 of file handle_range.cpp.
References eNa_strand_unknown.
Referenced by IntersectingWith(), and IntersectingWithSubranges().
|
friend |
Definition at line 138 of file handle_range.hpp.
|
private |
Definition at line 132 of file handle_range.hpp.
Referenced by AddRange(), GetCircularRangeEnd(), GetCircularRangeStart(), GetLeft(), GetOverlappingRange(), GetRight(), GetStrandsFlag(), IsCircular(), and IsMultipart().
|
private |
Definition at line 133 of file handle_range.hpp.
Referenced by AddRange(), GetOverlappingRange(), IsMultipart(), and IsSingleStrand().
|
private |
Definition at line 135 of file handle_range.hpp.
Referenced by AddRange(), GetOverlappingRange(), and HasGaps().
|
private |
Definition at line 134 of file handle_range.hpp.
Referenced by CHandleRangeMap::AddRange(), AddRange(), GetOverlappingRange(), and HasGaps().
|
private |
Definition at line 129 of file handle_range.hpp.
Referenced by AddRange(), begin(), Empty(), end(), GetCircularRangeEnd(), GetCircularRangeStart(), GetLeft(), GetOverlappingRange(), GetRight(), GetStrandsFlag(), HasGaps(), IntersectingWith(), IntersectingWith_NoStrand(), IntersectingWithSubranges(), and MergeRange().
|
private |
Definition at line 131 of file handle_range.hpp.
Referenced by AddRange(), GetCircularRangeEnd(), GetLeft(), GetOverlappingRange(), GetRight(), GetStrandsFlag(), and IntersectingWithTotalRange().
|
private |
Definition at line 130 of file handle_range.hpp.
Referenced by AddRange(), GetCircularRangeStart(), GetLeft(), GetOverlappingRange(), GetRight(), GetStrandsFlag(), and IntersectingWithTotalRange().