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

Search Toolkit Book for CSeq_loc_Conversion

#include <objmgr/impl/seq_loc_cvt.hpp>

+ Inheritance diagram for CSeq_loc_Conversion:
+ Collaboration diagram for CSeq_loc_Conversion:

Public Types

enum  EConvertFlag { eCnvDefault, eCnvAlways }
 
enum  ELocationType { eLocation, eProduct }
 
typedef CRange< TSeqPosTRange
 
- Public Types inherited from CObject
enum  EAllocFillMode { eAllocFillNone = 1, eAllocFillZero, eAllocFillPattern }
 Control filling of newly allocated memory. More...
 
typedef CObjectCounterLocker TLockerType
 Default locker type for CRef. More...
 
typedef CAtomicCounter TCounter
 Counter type is CAtomiCounter. More...
 
typedef TCounter::TValue TCount
 Alias for value type of counter. More...
 

Public Member Functions

 CSeq_loc_Conversion (CSeq_loc &master_loc_empty, const CSeq_id_Handle &dst_id, const CSeqMap_CI &seg, const CSeq_id_Handle &src_id, CScope *scope)
 
 CSeq_loc_Conversion (CSeq_loc &master_loc_empty, const CSeq_id_Handle &dst_id, const TRange &dst_rg, const CSeq_id_Handle &src_id, TSeqPos src_start, bool reverse, CScope *scope)
 
 ~CSeq_loc_Conversion (void)
 
void CombineWith (CSeq_loc_Conversion &cvt)
 
TSeqPos ConvertPos (TSeqPos src_pos)
 
bool GoodSrcId (const CSeq_id &id)
 
bool MinusStrand (void) const
 
void ConvertSimpleLoc (const CSeq_id_Handle &src_id, const CRange< TSeqPos > src_range, const SAnnotObject_Index &src_index)
 
bool ConvertPoint (TSeqPos src_pos, ENa_strand src_strand)
 
bool ConvertPoint (const CSeq_point &src)
 
bool ConvertInterval (TSeqPos src_from, TSeqPos src_to, ENa_strand src_strand)
 
bool ConvertInterval (const CSeq_interval &src)
 
void ConvertFeature (CAnnotObject_Ref &ref, const CSeq_feat &orig_feat, CRef< CSeq_feat > &mapped_feat)
 
void ConvertCdregion (CAnnotObject_Ref &ref, const CSeq_feat &orig_feat, CRef< CSeq_feat > &mapped_feat)
 
void ConvertRna (CAnnotObject_Ref &ref, const CSeq_feat &orig_feat, CRef< CSeq_feat > &mapped_feat)
 
CConstRef< CInt_fuzzReverseFuzz (const CInt_fuzz &fuzz) const
 
bool Convert (const CSeq_loc &src, CRef< CSeq_loc > &dst, EConvertFlag flag=eCnvDefault)
 
void Reset (void)
 
void ResetKeepPartial (void)
 
bool IsPartial (void) const
 
bool HasUnconvertedId (void) const
 
void SetSrcId (const CSeq_id_Handle &src)
 
void SetConversion (const CSeqMap_CI &seg)
 
const CSeq_id_HandleGetSrc_id_Handle (void) const
 
TSeqPos GetSrc_from (void) const
 
TSeqPos GetSrc_to (void) const
 
const TRangeGetTotalRange (void) const
 
ENa_strand ConvertStrand (ENa_strand strand) const
 
void SetMappedLocation (CAnnotObject_Ref &ref, ELocationType loctype)
 
void MakeDstMix (CSeq_loc_mix &dst, const CSeq_loc_mix &src) const
 
const CSeq_id_HandleGetDst_id_Handle (void) const
 
const CSeq_idGetId (void) const
 
- Public Member Functions inherited from CObject
 CObject (void)
 Constructor. More...
 
 CObject (const CObject &src)
 Copy constructor. More...
 
virtual ~CObject (void)
 Destructor. More...
 
CObjectoperator= (const CObject &src) THROWS_NONE
 Assignment operator. More...
 
bool CanBeDeleted (void) const THROWS_NONE
 Check if object can be deleted. More...
 
bool IsAllocatedInPool (void) const THROWS_NONE
 Check if object is allocated in memory pool (not system heap) More...
 
bool Referenced (void) const THROWS_NONE
 Check if object is referenced. More...
 
bool ReferencedOnlyOnce (void) const THROWS_NONE
 Check if object is referenced only once. More...
 
void AddReference (void) const
 Add reference to object. More...
 
void RemoveReference (void) const
 Remove reference to object. More...
 
void ReleaseReference (void) const
 Remove reference without deleting object. More...
 
virtual void DoNotDeleteThisObject (void)
 Mark this object as not allocated in heap – do not delete this object. More...
 
virtual void DoDeleteThisObject (void)
 Mark this object as allocated in heap – object can be deleted. More...
 
void * operator new (size_t size)
 Define new operator for memory allocation. More...
 
void * operator new[] (size_t size)
 Define new[] operator for 'array' memory allocation. More...
 
void operator delete (void *ptr)
 Define delete operator for memory deallocation. More...
 
void operator delete[] (void *ptr)
 Define delete[] operator for memory deallocation. More...
 
void * operator new (size_t size, void *place)
 Define new operator. More...
 
void operator delete (void *ptr, void *place)
 Define delete operator. More...
 
void * operator new (size_t size, CObjectMemoryPool *place)
 Define new operator using memory pool. More...
 
void operator delete (void *ptr, CObjectMemoryPool *place)
 Define delete operator. More...
 
virtual void DebugDump (CDebugDumpContext ddc, unsigned int depth) const
 Define method for dumping debug information. More...
 
- Public Member Functions inherited from CDebugDumpable
 CDebugDumpable (void)
 
virtual ~CDebugDumpable (void)
 
void DebugDumpText (ostream &out, const string &bundle, unsigned int depth) const
 
void DebugDumpFormat (CDebugDumpFormatter &ddf, const string &bundle, unsigned int depth) const
 
void DumpToConsole (void) const
 

Protected Member Functions

void Convert (CAnnotObject_Ref &obj, ELocationType loctype)
 
void Convert (CAnnotObject_Ref &ref, ELocationType loctype, const CSeq_id_Handle &id, const CRange< TSeqPos > &range, const SAnnotObject_Index &index)
 
- Protected Member Functions inherited from CObject
virtual void DeleteThis (void)
 Virtual method "deleting" this object. More...
 

Private Types

enum  EPartialFlag { fPartial_from = 1 << 0, fPartial_to = 1 << 1 }
 
enum  EMappedObjectType {
  eMappedObjType_not_set, eMappedObjType_Seq_loc, eMappedObjType_Seq_point, eMappedObjType_Seq_interval,
  eMappedObjType_Seq_loc_mix
}
 
typedef int TPartialFlag
 

Private Member Functions

void CheckDstInterval (void)
 
void CheckDstPoint (void)
 
void CheckDstMix (void)
 
CRef< CSeq_intervalGetDstInterval (void)
 
CRef< CSeq_pointGetDstPoint (void)
 
CRef< CSeq_loc_mixGetDstMix (void)
 
void SetDstLoc (CRef< CSeq_loc > &loc)
 
bool IsSpecialLoc (void) const
 
CSeq_locGetDstLocEmpty (void)
 
CSeq_idGetDstId (void)
 
TRange GetDstRange (void)
 
TRange GetSrcRange (void) const
 
void ConvertPacked_int (const CSeq_loc &src, CRef< CSeq_loc > &dst)
 
void ConvertPacked_pnt (const CSeq_loc &src, CRef< CSeq_loc > &dst)
 
bool ConvertSimpleMix (const CSeq_loc &src)
 
void ConvertMix (const CSeq_loc &src, CRef< CSeq_loc > &dst, EConvertFlag flag=eCnvDefault)
 
void ConvertEquiv (const CSeq_loc &src, CRef< CSeq_loc > &dst)
 
void ConvertBond (const CSeq_loc &src, CRef< CSeq_loc > &dst)
 

Static Private Member Functions

static CSeq_loc_mix::Tdatas_ConvertToMix (CRef< CSeq_loc > &loc)
 

Private Attributes

CSeq_id_Handle m_Src_id_Handle
 
TSeqPos m_Src_from
 
TSeqPos m_Src_to
 
TSignedSeqPos m_Shift
 
bool m_Reverse
 
CSeq_id_Handle m_Dst_id_Handle
 
CRef< CSeq_locm_Dst_loc_Empty
 
TRange m_TotalRange
 
bool m_Partial
 
bool m_PartialHasUnconvertedId
 
TPartialFlag m_PartialFlag
 
CConstRef< CInt_fuzzm_DstFuzz_from
 
CConstRef< CInt_fuzzm_DstFuzz_to
 
EMappedObjectType m_LastType
 
TRange m_LastRange
 
ENa_strand m_LastStrand
 
CConstRef< CSeq_locm_SrcLoc
 
CHeapScope m_Scope
 
CRef< CGraphRangesm_GraphRanges
 

Friends

class CAnnot_Collector
 
class CSeq_loc_Conversion_Set
 
class CSeq_align_Mapper
 
struct CConversionRef_Less
 

Additional Inherited Members

- Static Public Member Functions inherited from CObject
static NCBI_NORETURN void ThrowNullPointerException (void)
 Define method to throw null pointer exception. More...
 
static NCBI_NORETURN void ThrowNullPointerException (const type_info &type)
 
static EAllocFillMode GetAllocFillMode (void)
 
static void SetAllocFillMode (EAllocFillMode mode)
 
static void SetAllocFillMode (const string &value)
 Set mode from configuration parameter value. More...
 
- Static Public Member Functions inherited from CDebugDumpable
static void EnableDebugDump (bool on)
 
- Static Public Attributes inherited from CObject
static const TCount eCounterBitsCanBeDeleted = 1 << 0
 Define possible object states. More...
 
static const TCount eCounterBitsInPlainHeap = 1 << 1
 Heap signature was found. More...
 
static const TCount eCounterBitsPlaceMask
 Mask for 'in heap' state flags. More...
 
static const int eCounterStep = 1 << 2
 Skip over the "in heap" bits. More...
 
static const TCount eCounterValid = TCount(1) << (sizeof(TCount) * 8 - 2)
 Minimal value for valid objects (reference counter is zero) Must be a single bit value. More...
 
static const TCount eCounterStateMask
 Valid object, and object in heap. More...
 

Detailed Description

Definition at line 76 of file seq_loc_cvt.hpp.

Member Typedef Documentation

Definition at line 273 of file seq_loc_cvt.hpp.

Definition at line 79 of file seq_loc_cvt.hpp.

Member Enumeration Documentation

Enumerator
eCnvDefault 
eCnvAlways 

Definition at line 132 of file seq_loc_cvt.hpp.

Enumerator
eLocation 
eProduct 

Definition at line 136 of file seq_loc_cvt.hpp.

Enumerator
eMappedObjType_not_set 
eMappedObjType_Seq_loc 
eMappedObjType_Seq_point 
eMappedObjType_Seq_interval 
eMappedObjType_Seq_loc_mix 

Definition at line 280 of file seq_loc_cvt.hpp.

Enumerator
fPartial_from 
fPartial_to 

Definition at line 269 of file seq_loc_cvt.hpp.

Constructor & Destructor Documentation

CSeq_loc_Conversion::CSeq_loc_Conversion ( CSeq_loc master_loc_empty,
const CSeq_id_Handle dst_id,
const CSeqMap_CI seg,
const CSeq_id_Handle src_id,
CScope scope 
)

Definition at line 64 of file seq_loc_cvt.cpp.

CSeq_loc_Conversion::CSeq_loc_Conversion ( CSeq_loc master_loc_empty,
const CSeq_id_Handle dst_id,
const TRange dst_rg,
const CSeq_id_Handle src_id,
TSeqPos  src_start,
bool  reverse,
CScope scope 
)
CSeq_loc_Conversion::~CSeq_loc_Conversion ( void  )

Definition at line 121 of file seq_loc_cvt.cpp.

References _ASSERT, and IsSpecialLoc().

Member Function Documentation

void CSeq_loc_Conversion::CheckDstInterval ( void  )
inlineprivate

Definition at line 413 of file seq_loc_cvt.cpp.

References eMappedObjType_not_set, eMappedObjType_Seq_interval, m_LastType, and NCBI_THROW.

Referenced by GetDstInterval().

void CSeq_loc_Conversion::CheckDstMix ( void  )
inlineprivate

Definition at line 435 of file seq_loc_cvt.cpp.

References eMappedObjType_not_set, eMappedObjType_Seq_loc_mix, m_LastType, and NCBI_THROW.

Referenced by GetDstMix().

void CSeq_loc_Conversion::CheckDstPoint ( void  )
inlineprivate

Definition at line 424 of file seq_loc_cvt.cpp.

References eMappedObjType_not_set, eMappedObjType_Seq_point, m_LastType, and NCBI_THROW.

Referenced by GetDstPoint().

void CSeq_loc_Conversion::CombineWith ( CSeq_loc_Conversion cvt)
bool CSeq_loc_Conversion::Convert ( const CSeq_loc src,
CRef< CSeq_loc > &  dst,
EConvertFlag  flag = eCnvDefault 
)
void CSeq_loc_Conversion::Convert ( CAnnotObject_Ref obj,
ELocationType  loctype 
)
protected
void CSeq_loc_Conversion::Convert ( CAnnotObject_Ref ref,
ELocationType  loctype,
const CSeq_id_Handle id,
const CRange< TSeqPos > &  range,
const SAnnotObject_Index index 
)
protected
void CSeq_loc_Conversion::ConvertBond ( const CSeq_loc src,
CRef< CSeq_loc > &  dst 
)
private
void CSeq_loc_Conversion::ConvertCdregion ( CAnnotObject_Ref ref,
const CSeq_feat orig_feat,
CRef< CSeq_feat > &  mapped_feat 
)
void CSeq_loc_Conversion::ConvertEquiv ( const CSeq_loc src,
CRef< CSeq_loc > &  dst 
)
private
void CSeq_loc_Conversion::ConvertFeature ( CAnnotObject_Ref ref,
const CSeq_feat orig_feat,
CRef< CSeq_feat > &  mapped_feat 
)
bool CSeq_loc_Conversion::ConvertInterval ( TSeqPos  src_from,
TSeqPos  src_to,
ENa_strand  src_strand 
)
bool CSeq_loc_Conversion::ConvertInterval ( const CSeq_interval src)
void CSeq_loc_Conversion::ConvertMix ( const CSeq_loc src,
CRef< CSeq_loc > &  dst,
EConvertFlag  flag = eCnvDefault 
)
private
void CSeq_loc_Conversion::ConvertPacked_int ( const CSeq_loc src,
CRef< CSeq_loc > &  dst 
)
private
void CSeq_loc_Conversion::ConvertPacked_pnt ( const CSeq_loc src,
CRef< CSeq_loc > &  dst 
)
private
bool CSeq_loc_Conversion::ConvertPoint ( TSeqPos  src_pos,
ENa_strand  src_strand 
)
bool CSeq_loc_Conversion::ConvertPoint ( const CSeq_point src)
TSeqPos CSeq_loc_Conversion::ConvertPos ( TSeqPos  src_pos)
inline

Definition at line 408 of file seq_loc_cvt.hpp.

References kInvalidSeqPos, m_Partial, m_Reverse, m_Shift, and m_Src_to.

Referenced by CombineWith(), and ConvertPacked_pnt().

void CSeq_loc_Conversion::ConvertRna ( CAnnotObject_Ref ref,
const CSeq_feat orig_feat,
CRef< CSeq_feat > &  mapped_feat 
)
void CSeq_loc_Conversion::ConvertSimpleLoc ( const CSeq_id_Handle src_id,
const CRange< TSeqPos src_range,
const SAnnotObject_Index src_index 
)
bool CSeq_loc_Conversion::ConvertSimpleMix ( const CSeq_loc src)
private
ENa_strand CSeq_loc_Conversion::ConvertStrand ( ENa_strand  strand) const
inline

Definition at line 437 of file seq_loc_cvt.hpp.

References m_Reverse, and Reverse().

Referenced by ConvertPacked_pnt().

const CSeq_id_Handle& CSeq_loc_Conversion::GetDst_id_Handle ( void  ) const
inline

Definition at line 185 of file seq_loc_cvt.hpp.

Referenced by CSeq_loc_Conversion_Set::Add().

CSeq_id& CSeq_loc_Conversion::GetDstId ( void  )
inlineprivate
CRef< CSeq_interval > CSeq_loc_Conversion::GetDstInterval ( void  )
private
CSeq_loc& CSeq_loc_Conversion::GetDstLocEmpty ( void  )
inlineprivate

Definition at line 218 of file seq_loc_cvt.hpp.

CRef< CSeq_loc_mix > CSeq_loc_Conversion::GetDstMix ( void  )
private
CRef< CSeq_point > CSeq_loc_Conversion::GetDstPoint ( void  )
private
TRange CSeq_loc_Conversion::GetDstRange ( void  )
inlineprivate

Definition at line 227 of file seq_loc_cvt.hpp.

Referenced by CombineWith().

const CSeq_id& CSeq_loc_Conversion::GetId ( void  ) const
inline

Definition at line 189 of file seq_loc_cvt.hpp.

Referenced by CAnnotMapping_Info::GetLocationId().

TSeqPos CSeq_loc_Conversion::GetSrc_from ( void  ) const
inline
const CSeq_id_Handle& CSeq_loc_Conversion::GetSrc_id_Handle ( void  ) const
inline

Definition at line 162 of file seq_loc_cvt.hpp.

Referenced by CSeq_loc_Conversion_Set::x_Add().

TSeqPos CSeq_loc_Conversion::GetSrc_to ( void  ) const
inline
TRange CSeq_loc_Conversion::GetSrcRange ( void  ) const
inlineprivate

Definition at line 233 of file seq_loc_cvt.hpp.

Referenced by CombineWith().

const TRange& CSeq_loc_Conversion::GetTotalRange ( void  ) const
inline
bool CSeq_loc_Conversion::GoodSrcId ( const CSeq_id id)
inline
bool CSeq_loc_Conversion::HasUnconvertedId ( void  ) const
inline

Definition at line 151 of file seq_loc_cvt.hpp.

Referenced by CSeq_loc_Conversion_Set::Convert().

bool CSeq_loc_Conversion::IsPartial ( void  ) const
inline
bool CSeq_loc_Conversion::IsSpecialLoc ( void  ) const
inlineprivate
void CSeq_loc_Conversion::MakeDstMix ( CSeq_loc_mix dst,
const CSeq_loc_mix src 
) const
bool CSeq_loc_Conversion::MinusStrand ( void  ) const
inline

Definition at line 105 of file seq_loc_cvt.hpp.

void CSeq_loc_Conversion::Reset ( void  )
void CSeq_loc_Conversion::ResetKeepPartial ( void  )
CConstRef< CInt_fuzz > CSeq_loc_Conversion::ReverseFuzz ( const CInt_fuzz fuzz) const
CSeq_loc_mix::Tdata * CSeq_loc_Conversion::s_ConvertToMix ( CRef< CSeq_loc > &  loc)
staticprivate
void CSeq_loc_Conversion::SetConversion ( const CSeqMap_CI seg)
void CSeq_loc_Conversion::SetDstLoc ( CRef< CSeq_loc > &  loc)
private
void CSeq_loc_Conversion::SetMappedLocation ( CAnnotObject_Ref ref,
ELocationType  loctype 
)
void CSeq_loc_Conversion::SetSrcId ( const CSeq_id_Handle src)
inline

Definition at line 156 of file seq_loc_cvt.hpp.

Referenced by CAnnot_Collector::x_SearchTSE2().

Friends And Related Function Documentation

friend class CAnnot_Collector
friend

Definition at line 195 of file seq_loc_cvt.hpp.

friend struct CConversionRef_Less
friend

Definition at line 299 of file seq_loc_cvt.hpp.

friend class CSeq_align_Mapper
friend

Definition at line 298 of file seq_loc_cvt.hpp.

friend class CSeq_loc_Conversion_Set
friend

Definition at line 297 of file seq_loc_cvt.hpp.

Member Data Documentation

CSeq_id_Handle CSeq_loc_Conversion::m_Dst_id_Handle
private

Definition at line 259 of file seq_loc_cvt.hpp.

Referenced by CombineWith(), and CSeq_align_Mapper::x_ConvertSegmentCvt().

CRef<CSeq_loc> CSeq_loc_Conversion::m_Dst_loc_Empty
private

Definition at line 260 of file seq_loc_cvt.hpp.

Referenced by CombineWith(), MakeDstMix(), and SetMappedLocation().

CConstRef<CInt_fuzz> CSeq_loc_Conversion::m_DstFuzz_from
private
CConstRef<CInt_fuzz> CSeq_loc_Conversion::m_DstFuzz_to
private
CRef<CGraphRanges> CSeq_loc_Conversion::m_GraphRanges
private
TRange CSeq_loc_Conversion::m_LastRange
private
ENa_strand CSeq_loc_Conversion::m_LastStrand
private
EMappedObjectType CSeq_loc_Conversion::m_LastType
private
bool CSeq_loc_Conversion::m_Partial
private
TPartialFlag CSeq_loc_Conversion::m_PartialFlag
private
bool CSeq_loc_Conversion::m_PartialHasUnconvertedId
private

Definition at line 266 of file seq_loc_cvt.hpp.

Referenced by ConvertSimpleLoc(), GoodSrcId(), and Reset().

bool CSeq_loc_Conversion::m_Reverse
private
CHeapScope CSeq_loc_Conversion::m_Scope
private

Definition at line 293 of file seq_loc_cvt.hpp.

Referenced by Convert(), and ConvertSimpleLoc().

TSignedSeqPos CSeq_loc_Conversion::m_Shift
private
TSeqPos CSeq_loc_Conversion::m_Src_from
private
CSeq_id_Handle CSeq_loc_Conversion::m_Src_id_Handle
private
TSeqPos CSeq_loc_Conversion::m_Src_to
private
CConstRef<CSeq_loc> CSeq_loc_Conversion::m_SrcLoc
private

Definition at line 290 of file seq_loc_cvt.hpp.

Referenced by ConvertSimpleMix(), and GetDstMix().

TRange CSeq_loc_Conversion::m_TotalRange
private

The documentation for this class was generated from the following files:
Modified on Mon Feb 19 12:44:15 2018 by modify_doxy.py rev. 546573