NCBI C++ ToolKit
|
Search Toolkit Book for CAlnIdMap
Container mapping seq-aligns to vectors of participating seq-ids. More...
#include <objtools/alnmgr/aln_tests.hpp>
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< Uint8 > | TCounter |
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 TAlnVec & | GetAlnVec (void) const |
Accessing the vector of alignments. More... | |
const TIdVec & | operator[] (size_t aln_idx) const |
Accessing the seq-ids of a particular seq-align. More... | |
const TIdVec & | operator[] (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... | |
CObject & | operator= (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< TIdVec > | TAlnIdVec |
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... | |
Container mapping seq-aligns to vectors of participating seq-ids.
TAlnSeqIdExtract is a functor used to extract seq-ids from seq-aligns.
Definition at line 55 of file aln_tests.hpp.
typedef size_t CAlnIdMap< _TAlnVec, TAlnSeqIdExtract >::size_type |
Definition at line 64 of file aln_tests.hpp.
|
private |
Definition at line 153 of file aln_tests.hpp.
|
private |
Definition at line 150 of file aln_tests.hpp.
typedef _TAlnVec CAlnIdMap< _TAlnVec, TAlnSeqIdExtract >::TAlnVec |
Container (vector) of seq-aligns.
Definition at line 59 of file aln_tests.hpp.
typedef TIdVec CAlnIdMap< _TAlnVec, TAlnSeqIdExtract >::value_type |
Definition at line 63 of file aln_tests.hpp.
|
inline |
Constructor.
extract | Functor for extracting AlnSeqId from seq-aligns. |
expected_number_of_alns | Hint 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.
|
inline |
Accessing the vector of alignments.
Definition at line 116 of file aln_tests.hpp.
References CAlnIdMap< _TAlnVec, TAlnSeqIdExtract >::m_AlnVec.
|
inline |
Accessing the seq-ids of a particular seq-align.
Definition at line 129 of file aln_tests.hpp.
References map_checker< Container >::end(), map_checker< Container >::find(), CAlnIdMap< _TAlnVec, TAlnSeqIdExtract >::m_AlnIdVec, CAlnIdMap< _TAlnVec, TAlnSeqIdExtract >::m_AlnMap, and NCBI_THROW.
|
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.
|
inline |
Adding an alignment.
NB #1: An exception might be thrown here if the alignment's seq-ids are inconsistent. NB #2: Only seq-ids are validated in release mode. The alignment is assumed to be otherwise valid. For efficiency (to avoid multiple validation), it is up to the user to assure the validity of the alignments.
Definition at line 87 of file aln_tests.hpp.
References _ASSERT, ctll::empty(), map_checker< Container >::end(), map_checker< Container >::erase(), map_checker< Container >::find(), map_checker< Container >::insert(), CAlnIdMap< _TAlnVec, TAlnSeqIdExtract >::m_AlnIdVec, CAlnIdMap< _TAlnVec, TAlnSeqIdExtract >::m_AlnMap, CAlnIdMap< _TAlnVec, TAlnSeqIdExtract >::m_AlnVec, CAlnIdMap< _TAlnVec, TAlnSeqIdExtract >::m_Extract, NCBI_EXCEPTION_THROW, NCBI_THROW, and CSeq_align::Validate().
Referenced by BuildAlignDataSource(), CAlnSpanVertModel::CAlnSpanVertModel(), ConvertSeq_align(), CAlignCleanup::CreatePairwiseFromMultiple(), CAlnBuildApp::Run(), CAlnTestApp::Run(), CAlignCleanup::x_Cleanup_AnchoredAln(), CMergeAlignmentsJob::x_CreateProjectItems(), CTreeBuilderJob::x_CreateProjectItems(), CAlnMultiDSBuilder::x_PreCreateSparseDataSource(), and CValidError_align::x_ValidateAlignPercentIdentity().
|
inline |
Size (number of alignments)
Definition at line 142 of file aln_tests.hpp.
References CAlnIdMap< _TAlnVec, TAlnSeqIdExtract >::m_AlnIdVec.
Referenced by CAlnTestApp::Run().
|
private |
Definition at line 154 of file aln_tests.hpp.
Referenced by CAlnIdMap< _TAlnVec, TAlnSeqIdExtract >::CAlnIdMap(), CAlnIdMap< _TAlnVec, TAlnSeqIdExtract >::operator[](), CAlnIdMap< _TAlnVec, TAlnSeqIdExtract >::push_back(), and CAlnIdMap< _TAlnVec, TAlnSeqIdExtract >::size().
|
private |
Definition at line 151 of file aln_tests.hpp.
Referenced by CAlnIdMap< _TAlnVec, TAlnSeqIdExtract >::operator[](), and CAlnIdMap< _TAlnVec, TAlnSeqIdExtract >::push_back().
|
private |
Definition at line 156 of file aln_tests.hpp.
Referenced by CAlnIdMap< _TAlnVec, TAlnSeqIdExtract >::CAlnIdMap(), CAlnIdMap< _TAlnVec, TAlnSeqIdExtract >::GetAlnVec(), and CAlnIdMap< _TAlnVec, TAlnSeqIdExtract >::push_back().
|
private |
Definition at line 148 of file aln_tests.hpp.
Referenced by CAlnIdMap< _TAlnVec, TAlnSeqIdExtract >::push_back().