NCBI C++ ToolKit
Public Types | Public Member Functions | Static Public Member Functions | Private Attributes
CSeqDBRangeList Class Reference

Search Toolkit Book for CSeqDBRangeList

CSeqDBRangeList. More...

#include <objtools/blast/seqdb_reader/impl/seqdbvol.hpp>

+ Inheritance diagram for CSeqDBRangeList:
+ Collaboration diagram for CSeqDBRangeList:

List of all members.

Public Types

typedef set< pair< int, int > > TRangeList
 List of sequence offset ranges.

Public Member Functions

 CSeqDBRangeList (CSeqDBAtlas &atlas)
 Constructor.
 ~CSeqDBRangeList ()
 Destructor.
bool IsCached ()
 Returns true if the sequence data is cached.
void SetRanges (const TRangeList &ranges, bool append_ranges, bool cache_data)
 Set ranges of the sequence that will be used.
const TRangeListGetRanges ()
 Get ranges of sequence offsets that will be used.
void FlushSequence ()
 Flush cached sequence data (if any).

Static Public Member Functions

static int ImmediateLength ()
 Sequences shorter than this will not use ranges in any case.

Private Attributes

CSeqDBAtlasm_Atlas
 Memory management layer.
TRangeList m_Ranges
 Range of offsets needed for this sequence.
bool m_CacheData
 True if caching of sequence data is required for this sequence.
const char * m_Sequence
 Pointer to cached sequence data.
int m_Length
 Length of sequence.
int m_RefCount
 Number of user-held references to this sequence.

Detailed Description

CSeqDBRangeList.

This class maintains a list of ranges of sequence offsets that are desired for performance optimization. For large sequences that need to be unpacked, this class describes the subsets of those sequences that will actually be used. Each instance of this class corresponds to sequence data for one OID.

Definition at line 100 of file seqdbvol.hpp.


Member Typedef Documentation

List of sequence offset ranges.

Definition at line 129 of file seqdbvol.hpp.


Constructor & Destructor Documentation

Constructor.

Parameters:
atlasThe SeqDB memory management layer. [in]

Definition at line 104 of file seqdbvol.hpp.

Destructor.

Definition at line 117 of file seqdbvol.hpp.

References FlushSequence().


Member Function Documentation

void CSeqDBRangeList::FlushSequence ( ) [inline]

Flush cached sequence data (if any).

Definition at line 146 of file seqdbvol.hpp.

Referenced by CSeqDBVol::SetOffsetRanges(), and ~CSeqDBRangeList().

Get ranges of sequence offsets that will be used.

Definition at line 140 of file seqdbvol.hpp.

References m_Ranges.

Referenced by CSeqDBVol::SetOffsetRanges().

static int CSeqDBRangeList::ImmediateLength ( ) [inline, static]

Sequences shorter than this will not use ranges in any case.

Definition at line 151 of file seqdbvol.hpp.

Referenced by CSeqDBVol::x_GetAmbigSeq().

Returns true if the sequence data is cached.

Definition at line 123 of file seqdbvol.hpp.

void CSeqDBRangeList::SetRanges ( const TRangeList ranges,
bool  append_ranges,
bool  cache_data 
)

Set ranges of the sequence that will be used.

Parameters:
rangesOffset ranges of the sequence that are needed. [in]
append_rangesIf true, combine new ranges with old. [in]
cache_dataIf true, SeqDB is allowed to cache data. [in]

Definition at line 2807 of file seqdbvol.cpp.

References set< Key, Compare >::begin(), set< Key, Compare >::end(), set< Key, Compare >::insert(), m_CacheData, and m_Ranges.

Referenced by CSeqDBVol::SetOffsetRanges().


Member Data Documentation

Memory management layer.

Definition at line 158 of file seqdbvol.hpp.

True if caching of sequence data is required for this sequence.

Definition at line 164 of file seqdbvol.hpp.

Referenced by SetRanges().

Length of sequence.

Definition at line 170 of file seqdbvol.hpp.

Range of offsets needed for this sequence.

Definition at line 161 of file seqdbvol.hpp.

Referenced by GetRanges(), and SetRanges().

Number of user-held references to this sequence.

Definition at line 173 of file seqdbvol.hpp.

Pointer to cached sequence data.

Definition at line 167 of file seqdbvol.hpp.


The documentation for this class was generated from the following files:
Modified on Sat Feb 28 10:57:23 2015 by modify_doxy.py rev. 426318