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

Search Toolkit Book for CSeqDBSequence

CSeqDBSequence –. More...

#include <objtools/blast/seqdb_reader/seqdb.hpp>

+ Collaboration diagram for CSeqDBSequence:

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...
 
CSeqDBSequenceoperator= (const CSeqDBSequence &)
 Prevent copy. More...
 

Private Attributes

CRef< CSeqDBm_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...
 

Detailed Description

CSeqDBSequence –.

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.

Definition at line 1596 of file seqdb.hpp.

Member Typedef Documentation

◆ TOID

Defines the type used to select which sequence to get.

Definition at line 1599 of file seqdb.hpp.

Constructor & Destructor Documentation

◆ CSeqDBSequence() [1/2]

CSeqDBSequence::CSeqDBSequence ( CSeqDB db,
int  oid 
)
inline

Get a hold a database sequence.

Definition at line 1602 of file seqdb.hpp.

References CSeqDB::GetSequence(), m_Data, m_DB, and m_Length.

◆ ~CSeqDBSequence()

CSeqDBSequence::~CSeqDBSequence ( )
inline

Destructor, returns the sequence.

Definition at line 1611 of file seqdb.hpp.

References m_Data, m_DB, and CSeqDB::RetSequence().

◆ CSeqDBSequence() [2/2]

CSeqDBSequence::CSeqDBSequence ( const CSeqDBSequence )
private

Prevent copy construct.

Member Function Documentation

◆ GetData()

const char* CSeqDBSequence::GetData ( void  )
inline

Get pointer to sequence data.

Definition at line 1619 of file seqdb.hpp.

References m_Data.

◆ GetLength()

int CSeqDBSequence::GetLength ( void  )
inline

Get sequence length.

Definition at line 1625 of file seqdb.hpp.

References m_Length.

◆ operator=()

CSeqDBSequence& CSeqDBSequence::operator= ( const CSeqDBSequence )
private

Prevent copy.

Member Data Documentation

◆ m_Data

const char* CSeqDBSequence::m_Data
private

The sequence data for this sequence.

Definition at line 1641 of file seqdb.hpp.

Referenced by CSeqDBSequence(), GetData(), and ~CSeqDBSequence().

◆ m_DB

CRef<CSeqDB> CSeqDBSequence::m_DB
private

The CSeqDB object this sequence is from.

Definition at line 1638 of file seqdb.hpp.

Referenced by CSeqDBSequence(), and ~CSeqDBSequence().

◆ m_Length

int CSeqDBSequence::m_Length
private

The length of this sequence.

Definition at line 1644 of file seqdb.hpp.

Referenced by CSeqDBSequence(), and GetLength().


The documentation for this class was generated from the following file:
Modified on Wed Sep 04 15:04:35 2024 by modify_doxy.py rev. 669887