NCBI C++ ToolKit
Public Types | Public Member Functions | Private Types | Private Attributes | Friends | List of all members
COffsetData< iterator_t > Class Template Reference

Search Toolkit Book for COffsetData

Iterator specific functionality of offset list manager class. More...

#include <algo/blast/dbindex/dbindex_sp.hpp>

+ Inheritance diagram for COffsetData< iterator_t >:
+ Collaboration diagram for COffsetData< iterator_t >:

Public Types

typedef iterator_t TIterator
 Type used to iterate over an offset list. More...
 
- Public Types inherited from COffsetData_Base
typedef CDbIndex::TWord TWord
 Index word type (public to support Solaris). More...
 
typedef CDbIndex::SOffsetValue TOffsetValue
 
typedef CVectorWrap< TWordTHashTable
 The type of the hash table. More...
 

Public Member Functions

 COffsetData (CNcbiIstream &is, unsigned long hkey_width, unsigned long stride, unsigned long ws_hint)
 Construct the object from the data in the given input stream. More...
 
 COffsetData (TWord **map, unsigned long hkey_width, unsigned long stride, unsigned long ws_hint)
 Constructs the object by mapping to the memory segment. More...
 
- Public Member Functions inherited from COffsetData_Base
 COffsetData_Base (TWord **map, unsigned long hkey_width, unsigned long stride, unsigned long ws_hint)
 Object constructor. More...
 
unsigned long hkey_width () const
 Get the width of the hash key in base pairs. More...
 
unsigned long getMinOffset () const
 Accessor for minimum offset value. More...
 
unsigned long getStride () const
 Accessor for stride value. More...
 
unsigned long getWSHint () const
 Accessor for ws_hint value. More...
 

Private Types

typedef COffsetData_Base TBase
 Base class alias. More...
 
typedef CVectorWrap< TWordTOffsets
 Type used to store offset lists. More...
 

Private Attributes

TOffsets offsets_
 Concatenated offset list data. More...
 
TWorddata_start_
 Start of the offset data. More...
 

Friends

class CPreOrderedOffsetIterator
 

Additional Inherited Members

- Protected Attributes inherited from COffsetData_Base
TWord total_
 Auxiliary data member used for importing the offset list data. More...
 
unsigned long hkey_width_
 Hash key width in bp. More...
 
unsigned long stride_
 Stride value used by the index. More...
 
unsigned long ws_hint_
 ws_hint values used by the index. More...
 
unsigned long min_offset_
 Minimum offset value used by the index. More...
 
THashTable hash_table_
 The hash table (mapping from Nmer values to the lists of offsets. More...
 

Detailed Description

template<typename iterator_t>
class COffsetData< iterator_t >

Iterator specific functionality of offset list manager class.

Type of objects maintaining the offset list data for all Nmers and the corresponding hash table.

Definition at line 167 of file dbindex_sp.hpp.

Member Typedef Documentation

◆ TBase

template<typename iterator_t >
typedef COffsetData_Base COffsetData< iterator_t >::TBase
private

Base class alias.

Definition at line 171 of file dbindex_sp.hpp.

◆ TIterator

template<typename iterator_t >
typedef iterator_t COffsetData< iterator_t >::TIterator

Type used to iterate over an offset list.

Definition at line 177 of file dbindex_sp.hpp.

◆ TOffsets

template<typename iterator_t >
typedef CVectorWrap< TWord > COffsetData< iterator_t >::TOffsets
private

Type used to store offset lists.

Definition at line 172 of file dbindex_sp.hpp.

Constructor & Destructor Documentation

◆ COffsetData() [1/2]

template<typename iterator_t >
COffsetData< iterator_t >::COffsetData ( CNcbiIstream is,
unsigned long  hkey_width,
unsigned long  stride,
unsigned long  ws_hint 
)

Construct the object from the data in the given input stream.

Parameters
is[I/O] the input stream containing the object data
hkey_width[I] hash key width
min_offset[I] minimum offset used by the index

◆ COffsetData() [2/2]

template<typename iterator_t >
COffsetData< iterator_t >::COffsetData ( TWord **  map,
unsigned long  hkey_width,
unsigned long  stride,
unsigned long  ws_hint 
)

Constructs the object by mapping to the memory segment.

Parameters
map[I/O] points to the memory segment
hkey_width[I] hash key width
stride[I] stride of the index
ws_hint[I] ws_hint value of the index

Definition at line 306 of file dbindex_sp.hpp.

References COffsetData< iterator_t >::data_start_, COffsetData< iterator_t >::offsets_, CVectorWrap< T >::SetPtr(), and COffsetData_Base::total_.

Friends And Related Function Documentation

◆ CPreOrderedOffsetIterator

template<typename iterator_t >
friend class CPreOrderedOffsetIterator
friend

Definition at line 169 of file dbindex_sp.hpp.

Member Data Documentation

◆ data_start_

template<typename iterator_t >
TWord* COffsetData< iterator_t >::data_start_
private

Start of the offset data.

Definition at line 202 of file dbindex_sp.hpp.

Referenced by COffsetData< iterator_t >::COffsetData(), and CPreOrderedOffsetIterator::Reset().

◆ offsets_

template<typename iterator_t >
TOffsets COffsetData< iterator_t >::offsets_
private

Concatenated offset list data.

Definition at line 201 of file dbindex_sp.hpp.

Referenced by COffsetData< iterator_t >::COffsetData().


The documentation for this class was generated from the following file:
Modified on Sun Apr 14 05:24:48 2024 by modify_doxy.py rev. 669887