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

Search Toolkit Book for CWGSResolver_VDB

#include <sra/readers/sra/impl/wgsresolver_impl.hpp>

+ Inheritance diagram for CWGSResolver_VDB:
+ Collaboration diagram for CWGSResolver_VDB:

Classes

struct  SAccIdxTableCursor
 
struct  SGiIdxTableCursor
 
struct  SImpl
 

Public Types

enum  EIndexType { eMainIndex , eSecondIndex , eThirdIndex }
 
- Public Types inherited from CWGSResolver
enum  EDebugLevel {
  eDebug_none = 0 , eDebug_error = 1 , eDebug_open = 2 , eDebug_request = 5 ,
  eDebug_replies = 6 , eDebug_resolve = 7 , eDebug_data = 8 , eDebug_all = 9
}
 
typedef vector< stringTWGSPrefixes
 
- 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 Member Functions

 CWGSResolver_VDB (const CVDBMgr &mgr, EIndexType index_type=eMainIndex, CWGSResolver_VDB *next_resolver=0)
 
 CWGSResolver_VDB (const CVDBMgr &mgr, const string &path, CWGSResolver_VDB *next_resolver=0)
 
 ~CWGSResolver_VDB (void)
 
void Open (const CVDBMgr &mgr, const string &path)
 
void Reopen (void)
 
void Close (void)
 
const stringGetWGSIndexPath (void) const
 
const stringGetWGSIndexResolvedPath (void) const
 
bool IsValid (void) const
 
bool AccIndexIsPrefix () const
 
const CTimeGetTimestamp (void) const
 
virtual TWGSPrefixes GetPrefixes (TGi gi)
 
virtual TWGSPrefixes GetPrefixes (const string &acc)
 
virtual bool Update (void)
 
- Public Member Functions inherited from CWGSResolver
 CWGSResolver (void)
 
virtual ~CWGSResolver (void)
 
virtual void SetWGSPrefix (TGi gi, const TWGSPrefixes &prefixes, const string &prefix)
 
virtual void SetWGSPrefix (const string &acc, const TWGSPrefixes &prefixes, const string &prefix)
 
virtual void SetNonWGS (TGi gi, const TWGSPrefixes &prefixes)
 
virtual void SetNonWGS (const string &acc, const TWGSPrefixes &prefixes)
 
- 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
 

Static Public Member Functions

static CRef< CWGSResolverCreateResolver (const CVDBMgr &mgr)
 
static string GetDefaultWGSIndexPath (EIndexType index_type=eMainIndex)
 
static string GetDefaultWGSIndexAcc (EIndexType index_type=eMainIndex)
 
- Static Public Member Functions inherited from CWGSResolver
static CRef< CWGSResolverCreateResolver (const CVDBMgr &mgr)
 
static bool s_DebugEnabled (EDebugLevel level)
 
- 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)
 

Protected Member Functions

const CVDBTableGiIdxTable (void)
 
const CVDBTableAccIdxTable (void)
 
CRef< SGiIdxTableCursorGiIdx (TIntId gi=0)
 
CRef< SAccIdxTableCursorAccIdx (void)
 
void Put (CRef< SGiIdxTableCursor > &curs, TIntId gi=0)
 
void Put (CRef< SAccIdxTableCursor > &curs)
 
void x_Close ()
 
bool x_Update ()
 
TWGSPrefixes x_GetGiPrefixes (TGi gi)
 
TWGSPrefixes x_GetAccPrefixes (const string &acc)
 
- Protected Member Functions inherited from CObject
virtual void DeleteThis (void)
 Virtual method "deleting" this object. More...
 

Private Types

typedef CRWLock TDBMutex
 

Private Attributes

CVDBMgr m_Mgr
 
TDBMutex m_DBMutex
 
string m_WGSIndexPath
 
unique_ptr< SImplm_Impl
 
CRef< CWGSResolver_VDBm_NextResolver
 

Additional Inherited Members

- 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 48 of file wgsresolver_impl.hpp.

Member Typedef Documentation

◆ TDBMutex

Definition at line 127 of file wgsresolver_impl.hpp.

Member Enumeration Documentation

◆ EIndexType

Enumerator
eMainIndex 
eSecondIndex 
eThirdIndex 

Definition at line 51 of file wgsresolver_impl.hpp.

Constructor & Destructor Documentation

◆ CWGSResolver_VDB() [1/2]

CWGSResolver_VDB::CWGSResolver_VDB ( const CVDBMgr mgr,
EIndexType  index_type = eMainIndex,
CWGSResolver_VDB next_resolver = 0 
)
explicit

◆ CWGSResolver_VDB() [2/2]

CWGSResolver_VDB::CWGSResolver_VDB ( const CVDBMgr mgr,
const string path,
CWGSResolver_VDB next_resolver = 0 
)

Definition at line 331 of file wgsresolver_impl.cpp.

References Open().

◆ ~CWGSResolver_VDB()

CWGSResolver_VDB::~CWGSResolver_VDB ( void  )

Definition at line 340 of file wgsresolver_impl.cpp.

References Close().

Member Function Documentation

◆ AccIdx()

CRef< CWGSResolver_VDB::SAccIdxTableCursor > CWGSResolver_VDB::AccIdx ( void  )
inlineprotected

Definition at line 446 of file wgsresolver_impl.cpp.

References m_Impl.

Referenced by x_GetAccPrefixes().

◆ AccIdxTable()

const CVDBTable& CWGSResolver_VDB::AccIdxTable ( void  )
inlineprotected

Definition at line 108 of file wgsresolver_impl.hpp.

References m_Impl.

Referenced by CWGSResolver_VDB::SImpl::AccIdx(), and CWGSResolver_VDB::SImpl::Put().

◆ AccIndexIsPrefix()

bool CWGSResolver_VDB::AccIndexIsPrefix ( ) const
inline

Definition at line 85 of file wgsresolver_impl.hpp.

References m_Impl.

Referenced by CreateResolver(), and x_GetAccPrefixes().

◆ Close()

void CWGSResolver_VDB::Close ( void  )

Definition at line 366 of file wgsresolver_impl.cpp.

References m_DBMutex, and x_Close().

Referenced by ~CWGSResolver_VDB().

◆ CreateResolver()

CRef< CWGSResolver > CWGSResolver_VDB::CreateResolver ( const CVDBMgr mgr)
static

◆ GetDefaultWGSIndexAcc()

string CWGSResolver_VDB::GetDefaultWGSIndexAcc ( EIndexType  index_type = eMainIndex)
static

◆ GetDefaultWGSIndexPath()

string CWGSResolver_VDB::GetDefaultWGSIndexPath ( EIndexType  index_type = eMainIndex)
static

◆ GetPrefixes() [1/2]

CWGSResolver::TWGSPrefixes CWGSResolver_VDB::GetPrefixes ( const string acc)
virtual

Implements CWGSResolver.

Definition at line 683 of file wgsresolver_impl.cpp.

References GetPrefixes(), m_NextResolver, and x_GetAccPrefixes().

◆ GetPrefixes() [2/2]

CWGSResolver::TWGSPrefixes CWGSResolver_VDB::GetPrefixes ( TGi  gi)
virtual

Implements CWGSResolver.

Definition at line 672 of file wgsresolver_impl.cpp.

References GetPrefixes(), m_NextResolver, and x_GetGiPrefixes().

Referenced by GetPrefixes(), and CWGSResolver_Ids::GetPrefixes().

◆ GetTimestamp()

const CTime& CWGSResolver_VDB::GetTimestamp ( void  ) const
inline

Definition at line 89 of file wgsresolver_impl.hpp.

References m_Impl.

Referenced by x_Update().

◆ GetWGSIndexPath()

const string& CWGSResolver_VDB::GetWGSIndexPath ( void  ) const
inline

Definition at line 74 of file wgsresolver_impl.hpp.

References m_WGSIndexPath.

Referenced by Reopen(), x_GetAccPrefixes(), x_GetGiPrefixes(), and x_Update().

◆ GetWGSIndexResolvedPath()

const string& CWGSResolver_VDB::GetWGSIndexResolvedPath ( void  ) const
inline

Definition at line 77 of file wgsresolver_impl.hpp.

References m_Impl.

Referenced by Open(), and x_Update().

◆ GiIdx()

CRef< CWGSResolver_VDB::SGiIdxTableCursor > CWGSResolver_VDB::GiIdx ( TIntId  gi = 0)
inlineprotected

Definition at line 439 of file wgsresolver_impl.cpp.

References m_Impl.

Referenced by x_GetGiPrefixes().

◆ GiIdxTable()

const CVDBTable& CWGSResolver_VDB::GiIdxTable ( void  )
inlineprotected

Definition at line 105 of file wgsresolver_impl.hpp.

References m_Impl.

Referenced by CWGSResolver_VDB::SImpl::Put().

◆ IsValid()

bool CWGSResolver_VDB::IsValid ( void  ) const
inline

Definition at line 81 of file wgsresolver_impl.hpp.

References m_Impl.

Referenced by CreateResolver(), CWGSResolver_VDB(), and Open().

◆ Open()

void CWGSResolver_VDB::Open ( const CVDBMgr mgr,
const string path 
)

◆ Put() [1/2]

void CWGSResolver_VDB::Put ( CRef< SAccIdxTableCursor > &  curs)
inlineprotected

Definition at line 460 of file wgsresolver_impl.cpp.

References m_Impl.

◆ Put() [2/2]

void CWGSResolver_VDB::Put ( CRef< SGiIdxTableCursor > &  curs,
TIntId  gi = 0 
)
inlineprotected

Definition at line 453 of file wgsresolver_impl.cpp.

References m_Impl.

Referenced by x_GetAccPrefixes(), and x_GetGiPrefixes().

◆ Reopen()

void CWGSResolver_VDB::Reopen ( void  )

Definition at line 511 of file wgsresolver_impl.cpp.

References GetWGSIndexPath(), m_Mgr, and Open().

Referenced by x_Update().

◆ Update()

bool CWGSResolver_VDB::Update ( void  )
virtual

Reimplemented from CWGSResolver.

Definition at line 520 of file wgsresolver_impl.cpp.

References m_NextResolver, Update(), and x_Update().

Referenced by Update().

◆ x_Close()

void CWGSResolver_VDB::x_Close ( void  )
protected

Definition at line 373 of file wgsresolver_impl.cpp.

References CVDBMgr::Close(), m_Impl, and m_Mgr.

Referenced by Close().

◆ x_GetAccPrefixes()

CWGSResolver::TWGSPrefixes CWGSResolver_VDB::x_GetAccPrefixes ( const string acc)
protected

◆ x_GetGiPrefixes()

CWGSResolver::TWGSPrefixes CWGSResolver_VDB::x_GetGiPrefixes ( TGi  gi)
protected

◆ x_Update()

bool CWGSResolver_VDB::x_Update ( void  )
protected

Member Data Documentation

◆ m_DBMutex

TDBMutex CWGSResolver_VDB::m_DBMutex
private

Definition at line 128 of file wgsresolver_impl.hpp.

Referenced by Close(), Open(), x_GetAccPrefixes(), and x_GetGiPrefixes().

◆ m_Impl

unique_ptr<SImpl> CWGSResolver_VDB::m_Impl
private

◆ m_Mgr

CVDBMgr CWGSResolver_VDB::m_Mgr
private

Definition at line 126 of file wgsresolver_impl.hpp.

Referenced by Reopen(), x_Close(), and x_Update().

◆ m_NextResolver

CRef<CWGSResolver_VDB> CWGSResolver_VDB::m_NextResolver
private

Definition at line 158 of file wgsresolver_impl.hpp.

Referenced by GetPrefixes(), and Update().

◆ m_WGSIndexPath

string CWGSResolver_VDB::m_WGSIndexPath
private

Definition at line 156 of file wgsresolver_impl.hpp.

Referenced by GetWGSIndexPath(), and Open().


The documentation for this class was generated from the following files:
Modified on Tue Feb 27 05:57:02 2024 by modify_doxy.py rev. 669887