NCBI C++ ToolKit
|
Search Toolkit Book for CAlnSeqId
Default IAlnSeqId implementation based on CSeq_id_Handle. More...
#include <objtools/alnmgr/aln_seqid.hpp>
Public Member Functions | |
CAlnSeqId (const CSeq_id &id) | |
Constructor. More... | |
virtual const CSeq_id & | GetSeqId (void) const |
Get CSeq_id. More... | |
virtual string | AsString (void) const |
Sequence label - same as CSeq_id_Handle::AsString() More... | |
virtual bool | operator== (const IAlnSeqId &id) const |
Comparison operators. More... | |
virtual bool | operator!= (const IAlnSeqId &id) const |
virtual bool | operator< (const IAlnSeqId &id) const |
virtual void | SetBioseqHandle (const CBioseq_Handle &handle) |
Store bioseq handle for the id. More... | |
virtual TMol | GetSequenceType (void) const |
Check sequence type. More... | |
virtual int | GetBaseWidth (void) const |
Base Width - 1 = nucleotide, 3 = protein. More... | |
virtual void | SetBaseWidth (int base_width) |
Set base width for the sequence. More... | |
![]() | |
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... | |
![]() | |
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 |
![]() | |
CSeq_id_Handle (void) | |
CSeq_id_Handle (const CSeq_id_Info *info, TPacked packed=0, TVariant variant=0) | |
CSeq_id_Handle (ENull) | |
bool | operator== (const CSeq_id_Handle &handle) const |
bool | operator!= (const CSeq_id_Handle &handle) const |
bool | operator< (const CSeq_id_Handle &handle) const |
bool | operator== (const CSeq_id &id) const |
int | CompareOrdered (const CSeq_id_Handle &id) const |
Compare ids in a defined order (see CSeq_id::CompareOrdered()) More... | |
DECLARE_OPERATOR_BOOL_REF (m_Info) | |
Check if the handle is a valid or an empty one. More... | |
void | Reset (void) |
Reset the handle (remove seq-id reference) More... | |
bool | HaveMatchingHandles (void) const |
bool | HaveReverseMatch (void) const |
bool | HaveMatchingHandles (EAllowWeakMatch allow_weak_match) const |
bool | HaveReverseMatch (EAllowWeakMatch allow_weak_match) const |
void | GetMatchingHandles (TMatches &matches) const |
void | GetReverseMatchingHandles (TMatches &matches) const |
void | GetMatchingHandles (TMatches &matches, EAllowWeakMatch allow_weak_match) const |
void | GetReverseMatchingHandles (TMatches &matches, EAllowWeakMatch allow_weak_match) const |
bool | MatchesTo (const CSeq_id_Handle &h) const |
True if *this matches to h. More... | |
bool | IsBetter (const CSeq_id_Handle &h) const |
True if "this" is a better bioseq than "h". More... | |
string | AsString (void) const |
CSeq_id::E_Choice | Which (void) const |
bool | IsPacked (void) const |
TPacked | GetPacked (void) const |
bool | IsSetVariant (void) const |
TVariant | GetVariant (void) const |
bool | IsGi (void) const |
TGi | GetGi (void) const |
bool | IsAccVer (void) const |
unsigned | GetHash (void) const |
CSeq_id::EAccessionInfo | IdentifyAccession (void) const |
CConstRef< CSeq_id > | GetSeqId (void) const |
CConstRef< CSeq_id > | GetSeqIdOrNull (void) const |
CSeq_id_Mapper & | GetMapper (void) const |
void | Swap (CSeq_id_Handle &idh) |
bool | IsAllowedSNPScaleLimit (CSeq_id::ESNPScaleLimit scale_limit) const |
const CSeq_id_Info * | x_GetInfo (void) const |
![]() | |
bool | IsProtein (void) const |
bool | IsNucleotide (void) const |
virtual | ~IAlnSeqId (void) |
Virtual destructor. More... | |
Private Attributes | |
CConstRef< CSeq_id > | m_Seq_id |
CBioseq_Handle | m_BioseqHandle |
TMol | m_Mol |
int | m_BaseWidth |
Additional Inherited Members | |
![]() | |
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... | |
![]() | |
typedef CSeq_id_Info::TPacked | TPacked |
typedef CSeq_id_Info::TVariant | TVariant |
typedef set< CSeq_id_Handle > | TMatches |
![]() | |
typedef CSeq_inst::TMol | TMol |
![]() | |
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 void | EnableDebugDump (bool on) |
![]() | |
static CSeq_id_Handle | GetHandle (const CSeq_id &id) |
Normal way of getting a handle, works for any seq-id. More... | |
static CSeq_id_Handle | GetHandle (const string &str_id) |
Construct CSeq_id from string representation and return handle for it. More... | |
static CSeq_id_Handle | GetHandle (TGi gi) |
Faster way to create a handle for a gi. More... | |
static CSeq_id_Handle | GetGiHandle (TGi gi) |
Faster way to create a handle for a gi. More... | |
![]() | |
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... | |
![]() | |
virtual void | DeleteThis (void) |
Virtual method "deleting" this object. More... | |
Default IAlnSeqId implementation based on CSeq_id_Handle.
Definition at line 112 of file aln_seqid.hpp.
Constructor.
Definition at line 119 of file aln_seqid.hpp.
|
virtual |
Sequence label - same as CSeq_id_Handle::AsString()
Implements IAlnSeqId.
Definition at line 60 of file aln_seqid.cpp.
References CSeq_id_Handle::AsString().
|
virtual |
Base Width - 1 = nucleotide, 3 = protein.
Implements IAlnSeqId.
Definition at line 94 of file aln_seqid.cpp.
References m_BaseWidth.
Get CSeq_id.
Implements IAlnSeqId.
Definition at line 55 of file aln_seqid.cpp.
References m_Seq_id.
|
virtual |
Check sequence type.
Implements IAlnSeqId.
Definition at line 75 of file aln_seqid.cpp.
References CSeq_inst_Base::eMol_aa, CSeq_inst_Base::eMol_na, CSeq_inst_Base::eMol_not_set, CSeq_id::fAcc_nuc, CSeq_id::fAcc_prot, CSeq_id_Handle::IdentifyAccession(), m_BaseWidth, and m_Mol.
Implements IAlnSeqId.
Definition at line 114 of file aln_seqid.cpp.
References CSeq_id_Handle::operator!=().
Implements IAlnSeqId.
Definition at line 119 of file aln_seqid.cpp.
Comparison operators.
Implements IAlnSeqId.
Definition at line 109 of file aln_seqid.cpp.
References CSeq_id_Handle::operator==().
|
virtual |
Set base width for the sequence.
Implements IAlnSeqId.
Definition at line 99 of file aln_seqid.cpp.
References _ASSERT, CSeq_inst_Base::eMol_aa, CSeq_inst_Base::eMol_na, CSeq_inst_Base::eMol_not_set, IAlnSeqId::IsNucleotide(), IAlnSeqId::IsProtein(), m_BaseWidth, and m_Mol.
|
virtual |
Store bioseq handle for the id.
Definition at line 65 of file aln_seqid.cpp.
References CBioseq_Handle::GetSequenceType(), CSeq_inst::IsAa(), m_BaseWidth, m_BioseqHandle, and m_Mol.
|
private |
Definition at line 151 of file aln_seqid.hpp.
Referenced by GetBaseWidth(), GetSequenceType(), SetBaseWidth(), and SetBioseqHandle().
|
private |
Definition at line 149 of file aln_seqid.hpp.
Referenced by SetBioseqHandle().
|
mutableprivate |
Definition at line 150 of file aln_seqid.hpp.
Referenced by GetSequenceType(), SetBaseWidth(), and SetBioseqHandle().
Definition at line 148 of file aln_seqid.hpp.
Referenced by GetSeqId().