NCBI C++ ToolKit
Public Types | Public Member Functions | Private Types | Private Attributes | List of all members
CAlnIdMap< _TAlnVec, TAlnSeqIdExtract > Class Template Reference

Search Toolkit Book for CAlnIdMap

Container mapping seq-aligns to vectors of participating seq-ids. More...

#include <objtools/alnmgr/aln_tests.hpp>

+ Inheritance diagram for CAlnIdMap< _TAlnVec, TAlnSeqIdExtract >:
+ Collaboration diagram for CAlnIdMap< _TAlnVec, TAlnSeqIdExtract >:

Public Types

typedef _TAlnVec TAlnVec
 Container (vector) of seq-aligns. More...
 
typedef TAlnSeqIdExtract::TIdVec TIdVec
 Container (vector) of seq-ids. More...
 
typedef TIdVec value_type
 
typedef size_t size_type
 
- 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 atomic< Uint8TCounter
 Counter type is CAtomiCounter. More...
 
typedef Uint8 TCount
 Alias for value type of counter. More...
 

Public Member Functions

 CAlnIdMap (const TAlnSeqIdExtract &extract, size_t expected_number_of_alns=0)
 Constructor. More...
 
void push_back (const CSeq_align &aln)
 Adding an alignment. More...
 
const TAlnVecGetAlnVec (void) const
 Accessing the vector of alignments. More...
 
const TIdVecoperator[] (size_t aln_idx) const
 Accessing the seq-ids of a particular seq-align. More...
 
const TIdVecoperator[] (const CSeq_align &aln) const
 Accessing the seq-ids of a particular seq-align. More...
 
size_type size (void) const
 Size (number of alignments) More...
 
- 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
 

Private Types

typedef map< const CSeq_align *, size_t > TAlnMap
 
typedef vector< TIdVecTAlnIdVec
 

Private Attributes

const TAlnSeqIdExtract & m_Extract
 
TAlnMap m_AlnMap
 
TAlnIdVec m_AlnIdVec
 
TAlnVec m_AlnVec
 

Additional Inherited Members

- Static Public Member Functions inherited from CObject
static NCBI_XNCBI_EXPORT void ThrowNullPointerException (void)
 Define method to throw null pointer exception. More...
 
static NCBI_XNCBI_EXPORT 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...
 
- Protected Member Functions inherited from CObject
virtual void DeleteThis (void)
 Virtual method "deleting" this object. More...
 

Detailed Description

template<class _TAlnVec, class TAlnSeqIdExtract>
class CAlnIdMap< _TAlnVec, TAlnSeqIdExtract >

Container mapping seq-aligns to vectors of participating seq-ids.

TAlnSeqIdExtract is a functor used to extract seq-ids from seq-aligns.

See also
CAlnSeqIdsExtract
TAlnIdMap
TScopeAlnIdMap

Definition at line 55 of file aln_tests.hpp.

Member Typedef Documentation

◆ size_type

template<class _TAlnVec , class TAlnSeqIdExtract >
typedef size_t CAlnIdMap< _TAlnVec, TAlnSeqIdExtract >::size_type

Definition at line 64 of file aln_tests.hpp.

◆ TAlnIdVec

template<class _TAlnVec , class TAlnSeqIdExtract >
typedef vector<TIdVec> CAlnIdMap< _TAlnVec, TAlnSeqIdExtract >::TAlnIdVec
private

Definition at line 153 of file aln_tests.hpp.

◆ TAlnMap

template<class _TAlnVec , class TAlnSeqIdExtract >
typedef map<const CSeq_align*, size_t> CAlnIdMap< _TAlnVec, TAlnSeqIdExtract >::TAlnMap
private

Definition at line 150 of file aln_tests.hpp.

◆ TAlnVec

template<class _TAlnVec , class TAlnSeqIdExtract >
typedef _TAlnVec CAlnIdMap< _TAlnVec, TAlnSeqIdExtract >::TAlnVec

Container (vector) of seq-aligns.

Definition at line 59 of file aln_tests.hpp.

◆ TIdVec

template<class _TAlnVec , class TAlnSeqIdExtract >
typedef TAlnSeqIdExtract::TIdVec CAlnIdMap< _TAlnVec, TAlnSeqIdExtract >::TIdVec

Container (vector) of seq-ids.

See also
TAlnSeqIdIRef

Definition at line 62 of file aln_tests.hpp.

◆ value_type

template<class _TAlnVec , class TAlnSeqIdExtract >
typedef TIdVec CAlnIdMap< _TAlnVec, TAlnSeqIdExtract >::value_type

Definition at line 63 of file aln_tests.hpp.

Constructor & Destructor Documentation

◆ CAlnIdMap()

template<class _TAlnVec , class TAlnSeqIdExtract >
CAlnIdMap< _TAlnVec, TAlnSeqIdExtract >::CAlnIdMap ( const TAlnSeqIdExtract &  extract,
size_t  expected_number_of_alns = 0 
)
inline

Constructor.

Parameters
extractFunctor for extracting AlnSeqId from seq-aligns.
expected_number_of_alnsHint for optimization - the expected number of alignments.

Definition at line 72 of file aln_tests.hpp.

References CAlnIdMap< _TAlnVec, TAlnSeqIdExtract >::m_AlnIdVec, and CAlnIdMap< _TAlnVec, TAlnSeqIdExtract >::m_AlnVec.

Member Function Documentation

◆ GetAlnVec()

template<class _TAlnVec , class TAlnSeqIdExtract >
const TAlnVec& CAlnIdMap< _TAlnVec, TAlnSeqIdExtract >::GetAlnVec ( void  ) const
inline

Accessing the vector of alignments.

Definition at line 116 of file aln_tests.hpp.

References CAlnIdMap< _TAlnVec, TAlnSeqIdExtract >::m_AlnVec.

◆ operator[]() [1/2]

template<class _TAlnVec , class TAlnSeqIdExtract >
const TIdVec& CAlnIdMap< _TAlnVec, TAlnSeqIdExtract >::operator[] ( const CSeq_align aln) const
inline

◆ operator[]() [2/2]

template<class _TAlnVec , class TAlnSeqIdExtract >
const TIdVec& CAlnIdMap< _TAlnVec, TAlnSeqIdExtract >::operator[] ( size_t  aln_idx) const
inline

Accessing the seq-ids of a particular seq-align.

Definition at line 122 of file aln_tests.hpp.

References _ASSERT, and CAlnIdMap< _TAlnVec, TAlnSeqIdExtract >::m_AlnIdVec.

◆ push_back()

template<class _TAlnVec , class TAlnSeqIdExtract >
void CAlnIdMap< _TAlnVec, TAlnSeqIdExtract >::push_back ( const CSeq_align aln)
inline

◆ size()

template<class _TAlnVec , class TAlnSeqIdExtract >
size_type CAlnIdMap< _TAlnVec, TAlnSeqIdExtract >::size ( void  ) const
inline

Size (number of alignments)

Definition at line 142 of file aln_tests.hpp.

References CAlnIdMap< _TAlnVec, TAlnSeqIdExtract >::m_AlnIdVec.

Referenced by CAlnTestApp::Run().

Member Data Documentation

◆ m_AlnIdVec

template<class _TAlnVec , class TAlnSeqIdExtract >
TAlnIdVec CAlnIdMap< _TAlnVec, TAlnSeqIdExtract >::m_AlnIdVec
private

◆ m_AlnMap

template<class _TAlnVec , class TAlnSeqIdExtract >
TAlnMap CAlnIdMap< _TAlnVec, TAlnSeqIdExtract >::m_AlnMap
private

◆ m_AlnVec

template<class _TAlnVec , class TAlnSeqIdExtract >
TAlnVec CAlnIdMap< _TAlnVec, TAlnSeqIdExtract >::m_AlnVec
private

◆ m_Extract

template<class _TAlnVec , class TAlnSeqIdExtract >
const TAlnSeqIdExtract& CAlnIdMap< _TAlnVec, TAlnSeqIdExtract >::m_Extract
private

Definition at line 148 of file aln_tests.hpp.

Referenced by CAlnIdMap< _TAlnVec, TAlnSeqIdExtract >::push_back().


The documentation for this class was generated from the following file:
Modified on Thu Apr 25 08:18:02 2024 by modify_doxy.py rev. 669887