NCBI C++ ToolKit
|
Search Toolkit Book for CSeqDBSequence
#include <objtools/blast/seqdb_reader/seqdb.hpp>
Public Types | |
typedef CSeqDB::TOID | TOID |
Defines the type used to select which sequence to get. More... | |
Public Member Functions | |
CSeqDBSequence (CSeqDB *db, int oid) | |
Get a hold a database sequence. More... | |
~CSeqDBSequence () | |
Destructor, returns the sequence. More... | |
const char * | GetData () |
Get pointer to sequence data. More... | |
int | GetLength () |
Get sequence length. More... | |
Private Member Functions | |
CSeqDBSequence (const CSeqDBSequence &) | |
Prevent copy construct. More... | |
CSeqDBSequence & | operator= (const CSeqDBSequence &) |
Prevent copy. More... | |
Private Attributes | |
CRef< CSeqDB > | m_DB |
The CSeqDB object this sequence is from. More... | |
const char * | m_Data |
The sequence data for this sequence. More... | |
int | m_Length |
The length of this sequence. More... | |
Small class to implement RIAA for sequences.
The CSeqDB class requires that sequences be returned at some point after they are gotten. This class provides that service via the destructor. It also insures that the database itself stays around for at least the duration of its lifetime, by holding a CRef<> to that object. CSeqDB::GetSequence may be used directly to avoid the small overhead of this class, provided care is taken to call CSeqDB::RetSequence. The data referred to by this object is not modifyable, and is memory mapped (read only) where supported.
typedef CSeqDB::TOID CSeqDBSequence::TOID |
|
inline |
Destructor, returns the sequence.
Definition at line 1611 of file seqdb.hpp.
References m_Data, m_DB, and CSeqDB::RetSequence().
|
private |
Prevent copy construct.
|
inline |
|
inline |
|
private |
Prevent copy.
|
private |
The sequence data for this sequence.
Definition at line 1641 of file seqdb.hpp.
Referenced by CSeqDBSequence(), GetData(), and ~CSeqDBSequence().
The CSeqDB object this sequence is from.
Definition at line 1638 of file seqdb.hpp.
Referenced by CSeqDBSequence(), and ~CSeqDBSequence().
|
private |
The length of this sequence.
Definition at line 1644 of file seqdb.hpp.
Referenced by CSeqDBSequence(), and GetLength().