NCBI C++ ToolKit
Classes | Public Types | Public Member Functions | Protected Member Functions | Private Types | Private Attributes | Friends | List of all members
CSNPDb_Impl Class Reference

Search Toolkit Book for CSNPDb_Impl

#include <sra/readers/sra/snpread.hpp>

+ Inheritance diagram for CSNPDb_Impl:
+ Collaboration diagram for CSNPDb_Impl:

Classes

struct  SExtraTableCursor
 
struct  SFeatTableCursor
 
struct  SGraphTableCursor
 
struct  SPageTableCursor
 
struct  SSeqInfo
 
struct  SSeqTableCursor
 
struct  STrackInfo
 
struct  STrackTableCursor
 

Public Types

typedef vector< SSeqInfoTSeqInfoList
 
typedef map< CSeq_id_Handle, size_t > TSeqInfoMapBySeq_id
 
typedef vector< STrackInfoTTrackInfoList
 
typedef map< string, size_t > TTrackInfoMapByName
 
- 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 SSNPDb_Defs
enum  ESearchMode { eSearchByOverlap , eSearchByStart }
 
enum  EFeatSubtype {
  eFeatSubtype_unknown = 0 , eFeatSubtype_identity = 1 , eFeatSubtype_inversion = 2 , eFeatSubtype_single_nucleotide_variation = 3 ,
  eFeatSubtype_multi_nucleotide_variation = 4 , eFeatSubtype_deletion_insertion = 5 , eFeatSubtype_deletion = 6 , eFeatSubtype_insertion = 7 ,
  eFeatSubtype_str = 8
}
 
enum  EFeatSubtypeChar {
  eFeatSubtypeChar_unknown = 'U' , eFeatSubtypeChar_identity = '-' , eFeatSubtypeChar_inversion = 'V' , eFeatSubtypeChar_single_nucleotide_variation = 'S' ,
  eFeatSubtypeChar_multi_nucleotide_variation = 'M' , eFeatSubtypeChar_deletion_insertion = 'L' , eFeatSubtypeChar_deletion = 'D' , eFeatSubtypeChar_insertion = 'I' ,
  eFeatSubtypeChar_str = 'R'
}
 
typedef Uint8 TFilter
 
typedef int TSplitVersion
 
typedef int TChunkId
 

Public Member Functions

 CSNPDb_Impl (CVDBMgr &mgr, CTempString path_or_acc)
 
virtual ~CSNPDb_Impl (void)
 
const stringGetDbPath (void) const
 
const TSeqInfoListGetSeqInfoList (void) const
 
const TSeqInfoMapBySeq_idGetSeqInfoMapBySeq_id (void) const
 
const TTrackInfoListGetTrackInfoList (void) const
 
const TTrackInfoMapByNameGetTrackInfoMapByName (void) const
 
TTrackInfoList::const_iterator FindTrack (const string &name) const
 
TSeqInfoList::const_iterator FindSeq (const string &accession, int version)
 
TSeqInfoList::const_iterator FindSeq (const CSeq_id_Handle &seq_id)
 
TSeqPos GetPageSize (void) const
 
TSeqPos GetOverviewZoom (void) const
 
TSeqPos GetCoverageZoom (void) const
 
- 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
 

Protected Member Functions

const CVDBTableSeqTable (void)
 
const CVDBTableGraphTable (void)
 
const CVDBTablePageTable (void)
 
const CVDBTableFeatTable (void)
 
const CVDBTableExtraTable (void)
 
CRef< SSeqTableCursorSeq (TVDBRowId row=0)
 
void Put (CRef< SSeqTableCursor > &curs, TVDBRowId row=0)
 
CRef< SGraphTableCursorGraph (TVDBRowId row=0)
 
void Put (CRef< SGraphTableCursor > &curs, TVDBRowId row=0)
 
CRef< SPageTableCursorPage (TVDBRowId row=0)
 
void Put (CRef< SPageTableCursor > &curs, TVDBRowId row=0)
 
CRef< SFeatTableCursorFeat (TVDBRowId row=0)
 
void Put (CRef< SFeatTableCursor > &curs, TVDBRowId row=0)
 
CRef< SExtraTableCursorExtra (TVDBRowId row=0)
 
void Put (CRef< SExtraTableCursor > &curs, TVDBRowId row=0)
 
size_t x_GetSeqVDBIndex (TSeqInfoList::const_iterator seq) const
 
size_t x_GetTrackVDBIndex (TTrackInfoList::const_iterator track) const
 
TVDBRowId x_GetSeqVDBRowId (TSeqInfoList::const_iterator seq) const
 
TVDBRowId x_GetTrackVDBRowId (TTrackInfoList::const_iterator track) const
 
void x_Update (TSeqInfoList::const_iterator seq)
 
CRange< TVDBRowIdx_GetPageVDBRowRange (TSeqInfoList::const_iterator seq)
 
TVDBRowId x_GetGraphVDBRowId (TSeqInfoList::const_iterator seq, TTrackInfoList::const_iterator track)
 
- Protected Member Functions inherited from CObject
virtual void DeleteThis (void)
 Virtual method "deleting" this object. More...
 

Private Types

typedef map< TVDBRowId, TVDBRowIdTSeq2PageMap
 

Private Attributes

CVDBMgr m_Mgr
 
string m_DbPath
 
CVDB m_Db
 
CVDBTable m_SeqTable
 
CVDBTable m_GraphTable
 
CVDBTable m_PageTable
 
CVDBTable m_FeatTable
 
CVDBTable m_ExtraTable
 
CVDBObjectCache< SSeqTableCursorm_Seq
 
CVDBTableIndex m_SeqAccIndex
 
CVDBObjectCache< SGraphTableCursorm_Graph
 
CVDBObjectCache< SPageTableCursorm_Page
 
CVDBObjectCache< SFeatTableCursorm_Feat
 
CVDBObjectCache< SExtraTableCursorm_Extra
 
TSeqInfoList m_SeqList
 
TSeqInfoMapBySeq_id m_SeqMapBySeq_id
 
TSeq2PageMap m_Seq2PageMap
 
TTrackInfoList m_TrackList
 
TTrackInfoMapByName m_TrackMapByName
 
CMutex m_Mutex
 

Friends

class CSNPDbTrackIterator
 
class CSNPDbSeqIterator
 
class CSNPDbPageIterator
 
class CSNPDbGraphIterator
 
class CSNPDbFeatIterator
 

Additional Inherited Members

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

Detailed Description

Definition at line 180 of file snpread.hpp.

Member Typedef Documentation

◆ TSeq2PageMap

Definition at line 361 of file snpread.hpp.

◆ TSeqInfoList

Definition at line 222 of file snpread.hpp.

◆ TSeqInfoMapBySeq_id

Definition at line 223 of file snpread.hpp.

◆ TTrackInfoList

Definition at line 230 of file snpread.hpp.

◆ TTrackInfoMapByName

Definition at line 231 of file snpread.hpp.

Constructor & Destructor Documentation

◆ CSNPDb_Impl()

CSNPDb_Impl::CSNPDb_Impl ( CVDBMgr mgr,
CTempString  path_or_acc 
)

◆ ~CSNPDb_Impl()

CSNPDb_Impl::~CSNPDb_Impl ( void  )
virtual

Definition at line 447 of file snpread.cpp.

Member Function Documentation

◆ Extra()

CRef< CSNPDb_Impl::SExtraTableCursor > CSNPDb_Impl::Extra ( TVDBRowId  row = 0)
protected

Definition at line 274 of file snpread.cpp.

References ExtraTable(), m_Extra, row, and table.

Referenced by CSNPDbFeatIterator::GetExtraRange().

◆ ExtraTable()

const CVDBTable& CSNPDb_Impl::ExtraTable ( void  )
inlineprotected

Definition at line 295 of file snpread.hpp.

References m_ExtraTable.

Referenced by Extra().

◆ Feat()

CRef< CSNPDb_Impl::SFeatTableCursor > CSNPDb_Impl::Feat ( TVDBRowId  row = 0)
protected

Definition at line 264 of file snpread.cpp.

References FeatTable(), m_Feat, and row.

Referenced by CSNPDbFeatIterator::x_InitPage().

◆ FeatTable()

const CVDBTable& CSNPDb_Impl::FeatTable ( void  )
inlineprotected

Definition at line 291 of file snpread.hpp.

References m_FeatTable.

Referenced by Feat().

◆ FindSeq() [1/2]

CSNPDb_Impl::TSeqInfoList::const_iterator CSNPDb_Impl::FindSeq ( const CSeq_id_Handle seq_id)

◆ FindSeq() [2/2]

CSNPDb_Impl::TSeqInfoList::const_iterator CSNPDb_Impl::FindSeq ( const string accession,
int  version 
)

◆ FindTrack()

CSNPDb_Impl::TTrackInfoList::const_iterator CSNPDb_Impl::FindTrack ( const string name) const

◆ GetCoverageZoom()

TSeqPos CSNPDb_Impl::GetCoverageZoom ( void  ) const

Definition at line 464 of file snpread.cpp.

References kCoverageZoom.

Referenced by CSNPDb::GetCoverageZoom(), and CSNPDbSeqIterator::GetCoverageZoom().

◆ GetDbPath()

const string& CSNPDb_Impl::GetDbPath ( void  ) const
inline

Definition at line 233 of file snpread.hpp.

References m_DbPath.

Referenced by CSNPBlobId::CSNPBlobId(), x_GetGraphVDBRowId(), and x_GetPageVDBRowRange().

◆ GetOverviewZoom()

TSeqPos CSNPDb_Impl::GetOverviewZoom ( void  ) const

Definition at line 458 of file snpread.cpp.

References kOverviewZoom.

Referenced by CSNPDb::GetOverviewZoom(), and CSNPDbSeqIterator::GetOverviewZoom().

◆ GetPageSize()

TSeqPos CSNPDb_Impl::GetPageSize ( void  ) const

◆ GetSeqInfoList()

const TSeqInfoList& CSNPDb_Impl::GetSeqInfoList ( void  ) const
inline

◆ GetSeqInfoMapBySeq_id()

const TSeqInfoMapBySeq_id& CSNPDb_Impl::GetSeqInfoMapBySeq_id ( void  ) const
inline

Definition at line 240 of file snpread.hpp.

References m_SeqMapBySeq_id.

◆ GetTrackInfoList()

const TTrackInfoList& CSNPDb_Impl::GetTrackInfoList ( void  ) const
inline

◆ GetTrackInfoMapByName()

const TTrackInfoMapByName& CSNPDb_Impl::GetTrackInfoMapByName ( void  ) const
inline

Definition at line 247 of file snpread.hpp.

References m_TrackMapByName.

◆ Graph()

CRef< CSNPDb_Impl::SGraphTableCursor > CSNPDb_Impl::Graph ( TVDBRowId  row = 0)
protected

Definition at line 244 of file snpread.cpp.

References GraphTable(), m_Graph, and row.

Referenced by CSNPDbGraphIterator::Select(), and CSNPDbFeatIterator::x_SetFilter().

◆ GraphTable()

const CVDBTable& CSNPDb_Impl::GraphTable ( void  )
inlineprotected

Definition at line 283 of file snpread.hpp.

References m_GraphTable.

Referenced by Graph().

◆ Page()

CRef< CSNPDb_Impl::SPageTableCursor > CSNPDb_Impl::Page ( TVDBRowId  row = 0)
protected

Definition at line 254 of file snpread.cpp.

References m_Page, PageTable(), and row.

Referenced by CSNPDb_Impl(), CSNPDbSeqIterator::GetSNPCount(), CSNPDbPageIterator::Select(), and x_Update().

◆ PageTable()

const CVDBTable& CSNPDb_Impl::PageTable ( void  )
inlineprotected

Definition at line 287 of file snpread.hpp.

References m_PageTable.

Referenced by Page().

◆ Put() [1/5]

void CSNPDb_Impl::Put ( CRef< SExtraTableCursor > &  curs,
TVDBRowId  row = 0 
)
protected

Definition at line 310 of file snpread.cpp.

References m_Extra, and row.

◆ Put() [2/5]

void CSNPDb_Impl::Put ( CRef< SFeatTableCursor > &  curs,
TVDBRowId  row = 0 
)
protected

Definition at line 304 of file snpread.cpp.

References m_Feat, and row.

◆ Put() [3/5]

void CSNPDb_Impl::Put ( CRef< SGraphTableCursor > &  curs,
TVDBRowId  row = 0 
)
protected

Definition at line 292 of file snpread.cpp.

References m_Graph, and row.

◆ Put() [4/5]

void CSNPDb_Impl::Put ( CRef< SPageTableCursor > &  curs,
TVDBRowId  row = 0 
)
protected

Definition at line 298 of file snpread.cpp.

References m_Page, and row.

◆ Put() [5/5]

void CSNPDb_Impl::Put ( CRef< SSeqTableCursor > &  curs,
TVDBRowId  row = 0 
)
protected

◆ Seq()

CRef< CSNPDb_Impl::SSeqTableCursor > CSNPDb_Impl::Seq ( TVDBRowId  row = 0)
protected

Definition at line 234 of file snpread.cpp.

References m_Seq, row, and SeqTable().

Referenced by CSNPDb_Impl(), and x_Update().

◆ SeqTable()

const CVDBTable& CSNPDb_Impl::SeqTable ( void  )
inlineprotected

Definition at line 279 of file snpread.hpp.

References m_SeqTable.

Referenced by Seq().

◆ x_GetGraphVDBRowId()

TVDBRowId CSNPDb_Impl::x_GetGraphVDBRowId ( TSeqInfoList::const_iterator  seq,
TTrackInfoList::const_iterator  track 
)
protected

◆ x_GetPageVDBRowRange()

CRange< TVDBRowId > CSNPDb_Impl::x_GetPageVDBRowRange ( TSeqInfoList::const_iterator  seq)
protected

Definition at line 639 of file snpread.cpp.

References GetDbPath(), GetSeqInfoList(), and NCBI_THROW_FMT.

Referenced by CSNPDbSeqIterator::GetPageVDBRowRange().

◆ x_GetSeqVDBIndex()

size_t CSNPDb_Impl::x_GetSeqVDBIndex ( TSeqInfoList::const_iterator  seq) const
inlineprotected

Definition at line 324 of file snpread.hpp.

References GetSeqInfoList().

Referenced by CSNPDbSeqIterator::GetVDBSeqIndex(), and x_GetSeqVDBRowId().

◆ x_GetSeqVDBRowId()

TVDBRowId CSNPDb_Impl::x_GetSeqVDBRowId ( TSeqInfoList::const_iterator  seq) const
inlineprotected

◆ x_GetTrackVDBIndex()

size_t CSNPDb_Impl::x_GetTrackVDBIndex ( TTrackInfoList::const_iterator  track) const
inlineprotected

Definition at line 327 of file snpread.hpp.

References GetTrackInfoList().

Referenced by CSNPDbTrackIterator::GetVDBTrackIndex(), and x_GetTrackVDBRowId().

◆ x_GetTrackVDBRowId()

TVDBRowId CSNPDb_Impl::x_GetTrackVDBRowId ( TTrackInfoList::const_iterator  track) const
inlineprotected

◆ x_Update()

void CSNPDb_Impl::x_Update ( TSeqInfoList::const_iterator  seq)
protected

Friends And Related Function Documentation

◆ CSNPDbFeatIterator

friend class CSNPDbFeatIterator
friend

Definition at line 264 of file snpread.hpp.

◆ CSNPDbGraphIterator

friend class CSNPDbGraphIterator
friend

Definition at line 263 of file snpread.hpp.

◆ CSNPDbPageIterator

friend class CSNPDbPageIterator
friend

Definition at line 262 of file snpread.hpp.

◆ CSNPDbSeqIterator

friend class CSNPDbSeqIterator
friend

Definition at line 261 of file snpread.hpp.

◆ CSNPDbTrackIterator

friend class CSNPDbTrackIterator
friend

Definition at line 260 of file snpread.hpp.

Member Data Documentation

◆ m_Db

CVDB CSNPDb_Impl::m_Db
private

Definition at line 345 of file snpread.hpp.

Referenced by CSNPDb_Impl().

◆ m_DbPath

string CSNPDb_Impl::m_DbPath
private

Definition at line 344 of file snpread.hpp.

Referenced by GetDbPath().

◆ m_Extra

CVDBObjectCache<SExtraTableCursor> CSNPDb_Impl::m_Extra
private

Definition at line 357 of file snpread.hpp.

Referenced by Extra(), and Put().

◆ m_ExtraTable

CVDBTable CSNPDb_Impl::m_ExtraTable
private

Definition at line 350 of file snpread.hpp.

Referenced by CSNPDb_Impl(), and ExtraTable().

◆ m_Feat

CVDBObjectCache<SFeatTableCursor> CSNPDb_Impl::m_Feat
private

Definition at line 356 of file snpread.hpp.

Referenced by Feat(), and Put().

◆ m_FeatTable

CVDBTable CSNPDb_Impl::m_FeatTable
private

Definition at line 349 of file snpread.hpp.

Referenced by CSNPDb_Impl(), and FeatTable().

◆ m_Graph

CVDBObjectCache<SGraphTableCursor> CSNPDb_Impl::m_Graph
private

Definition at line 354 of file snpread.hpp.

Referenced by Graph(), and Put().

◆ m_GraphTable

CVDBTable CSNPDb_Impl::m_GraphTable
private

Definition at line 347 of file snpread.hpp.

Referenced by CSNPDb_Impl(), and GraphTable().

◆ m_Mgr

CVDBMgr CSNPDb_Impl::m_Mgr
private

Definition at line 343 of file snpread.hpp.

Referenced by CSNPDb_Impl().

◆ m_Mutex

CMutex CSNPDb_Impl::m_Mutex
private

Definition at line 366 of file snpread.hpp.

Referenced by x_Update().

◆ m_Page

CVDBObjectCache<SPageTableCursor> CSNPDb_Impl::m_Page
private

Definition at line 355 of file snpread.hpp.

Referenced by Page(), and Put().

◆ m_PageTable

CVDBTable CSNPDb_Impl::m_PageTable
private

Definition at line 348 of file snpread.hpp.

Referenced by CSNPDb_Impl(), and PageTable().

◆ m_Seq

CVDBObjectCache<SSeqTableCursor> CSNPDb_Impl::m_Seq
private

Definition at line 352 of file snpread.hpp.

Referenced by Put(), and Seq().

◆ m_Seq2PageMap

TSeq2PageMap CSNPDb_Impl::m_Seq2PageMap
private

Definition at line 362 of file snpread.hpp.

Referenced by x_Update().

◆ m_SeqAccIndex

CVDBTableIndex CSNPDb_Impl::m_SeqAccIndex
private

Definition at line 353 of file snpread.hpp.

Referenced by CSNPDb_Impl(), and FindSeq().

◆ m_SeqList

TSeqInfoList CSNPDb_Impl::m_SeqList
private

Definition at line 359 of file snpread.hpp.

Referenced by CSNPDb_Impl(), FindSeq(), GetSeqInfoList(), and x_Update().

◆ m_SeqMapBySeq_id

TSeqInfoMapBySeq_id CSNPDb_Impl::m_SeqMapBySeq_id
private

Definition at line 360 of file snpread.hpp.

Referenced by CSNPDb_Impl(), FindSeq(), and GetSeqInfoMapBySeq_id().

◆ m_SeqTable

CVDBTable CSNPDb_Impl::m_SeqTable
private

Definition at line 346 of file snpread.hpp.

Referenced by CSNPDb_Impl(), and SeqTable().

◆ m_TrackList

TTrackInfoList CSNPDb_Impl::m_TrackList
private

Definition at line 364 of file snpread.hpp.

Referenced by CSNPDb_Impl(), FindTrack(), GetTrackInfoList(), and x_Update().

◆ m_TrackMapByName

TTrackInfoMapByName CSNPDb_Impl::m_TrackMapByName
private

Definition at line 365 of file snpread.hpp.

Referenced by CSNPDb_Impl(), FindTrack(), and GetTrackInfoMapByName().


The documentation for this class was generated from the following files:
Modified on Fri Sep 20 14:57:52 2024 by modify_doxy.py rev. 669887