NCBI C++ ToolKit
Public Member Functions | Private Attributes | List of all members
CAlnSeqId Class Reference

Search Toolkit Book for CAlnSeqId

Default IAlnSeqId implementation based on CSeq_id_Handle. More...

#include <objtools/alnmgr/aln_seqid.hpp>

+ Inheritance diagram for CAlnSeqId:
+ Collaboration diagram for CAlnSeqId:

Public Member Functions

 CAlnSeqId (const CSeq_id &id)
 Constructor. More...
 
virtual const CSeq_idGetSeqId (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...
 
- 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
 
- Public Member Functions inherited from CSeq_id_Handle
 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_idGetSeqId (void) const
 
CConstRef< CSeq_idGetSeqIdOrNull (void) const
 
CSeq_id_MapperGetMapper (void) const
 
void Swap (CSeq_id_Handle &idh)
 
bool IsAllowedSNPScaleLimit (CSeq_id::ESNPScaleLimit scale_limit) const
 
const CSeq_id_Infox_GetInfo (void) const
 
- Public Member Functions inherited from IAlnSeqId
bool IsProtein (void) const
 
bool IsNucleotide (void) const
 
virtual ~IAlnSeqId (void)
 Virtual destructor. More...
 

Private Attributes

CConstRef< CSeq_idm_Seq_id
 
CBioseq_Handle m_BioseqHandle
 
TMol m_Mol
 
int m_BaseWidth
 

Additional Inherited Members

- 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 Types inherited from CSeq_id_Handle
typedef CSeq_id_Info::TPacked TPacked
 
typedef CSeq_id_Info::TVariant TVariant
 
typedef set< CSeq_id_HandleTMatches
 
- Public Types inherited from IAlnSeqId
typedef CSeq_inst::TMol TMol
 
- 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 Member Functions inherited from CSeq_id_Handle
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 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

Default IAlnSeqId implementation based on CSeq_id_Handle.

See also
CAlnSeqIdConverter
CAlnSeqIdsExtract

Definition at line 112 of file aln_seqid.hpp.

Constructor & Destructor Documentation

◆ CAlnSeqId()

CAlnSeqId::CAlnSeqId ( const CSeq_id id)
inline

Constructor.

Definition at line 119 of file aln_seqid.hpp.

Member Function Documentation

◆ AsString()

string CAlnSeqId::AsString ( void  ) const
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().

◆ GetBaseWidth()

int CAlnSeqId::GetBaseWidth ( void  ) const
virtual

Base Width - 1 = nucleotide, 3 = protein.

Implements IAlnSeqId.

Definition at line 94 of file aln_seqid.cpp.

References m_BaseWidth.

◆ GetSeqId()

const CSeq_id & CAlnSeqId::GetSeqId ( void  ) const
virtual

Get CSeq_id.

Implements IAlnSeqId.

Definition at line 55 of file aln_seqid.cpp.

References m_Seq_id.

◆ GetSequenceType()

IAlnSeqId::TMol CAlnSeqId::GetSequenceType ( void  ) const
virtual

◆ operator!=()

bool CAlnSeqId::operator!= ( const IAlnSeqId id) const
virtual

Implements IAlnSeqId.

Definition at line 114 of file aln_seqid.cpp.

References CSeq_id_Handle::operator!=().

◆ operator<()

bool CAlnSeqId::operator< ( const IAlnSeqId id) const
virtual

Implements IAlnSeqId.

Definition at line 119 of file aln_seqid.cpp.

◆ operator==()

bool CAlnSeqId::operator== ( const IAlnSeqId id) const
virtual

Comparison operators.

Implements IAlnSeqId.

Definition at line 109 of file aln_seqid.cpp.

References CSeq_id_Handle::operator==().

◆ SetBaseWidth()

void CAlnSeqId::SetBaseWidth ( int  base_width)
virtual

◆ SetBioseqHandle()

void CAlnSeqId::SetBioseqHandle ( const CBioseq_Handle handle)
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.

Member Data Documentation

◆ m_BaseWidth

int CAlnSeqId::m_BaseWidth
private

Definition at line 151 of file aln_seqid.hpp.

Referenced by GetBaseWidth(), GetSequenceType(), SetBaseWidth(), and SetBioseqHandle().

◆ m_BioseqHandle

CBioseq_Handle CAlnSeqId::m_BioseqHandle
private

Definition at line 149 of file aln_seqid.hpp.

Referenced by SetBioseqHandle().

◆ m_Mol

TMol CAlnSeqId::m_Mol
mutableprivate

Definition at line 150 of file aln_seqid.hpp.

Referenced by GetSequenceType(), SetBaseWidth(), and SetBioseqHandle().

◆ m_Seq_id

CConstRef<CSeq_id> CAlnSeqId::m_Seq_id
private

Definition at line 148 of file aln_seqid.hpp.

Referenced by GetSeqId().


The documentation for this class was generated from the following files:
Modified on Thu Dec 07 10:11:56 2023 by modify_doxy.py rev. 669887