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

Search Toolkit Book for CPubseqGatewayCacheBioseqInfo

#include "psg_cache_bioseq_info.hpp"
(Private to src/objtools/pubseq_gateway/cache.)

+ Inheritance diagram for CPubseqGatewayCacheBioseqInfo:
+ Collaboration diagram for CPubseqGatewayCacheBioseqInfo:

Public Member Functions

 CPubseqGatewayCacheBioseqInfo (const string &file_name)
 
 ~CPubseqGatewayCacheBioseqInfo () override
 
void Open ()
 
vector< CBioseqInfoRecordFetch (CBioseqInfoFetchRequest const &request)
 
vector< CBioseqInfoRecordFetchLast (void)
 
- Public Member Functions inherited from CPubseqGatewayCacheBase
 CPubseqGatewayCacheBase (const string &file_name)
 
virtual ~CPubseqGatewayCacheBase ()=default
 
void Open ()
 

Static Public Member Functions

static string PackKey (const string &accession, int version)
 
static string PackKey (const string &accession, int version, int seq_id_type)
 
static string PackKey (const string &accession, int version, int seq_id_type, int64_t gi)
 
static bool UnpackKey (const char *key, size_t key_sz, int &version, int &seq_id_type, int64_t &gi)
 
static bool UnpackKey (const char *key, size_t key_sz, string &accession, int &version, int &seq_id_type, int64_t &gi)
 

Private Member Functions

bool x_ExtractRecord (CBioseqInfoRecord &record, lmdb::val const &value) const
 
string x_MakeLookupKey (CBioseqInfoFetchRequest const &request) const
 
bool x_IsMatchingRecord (CBioseqInfoFetchRequest const &request, int version, int seq_id_type, int64_t gi) const
 
void ResetDbi ()
 

Private Attributes

unique_ptr< lmdb::dbi, function< void(lmdb::dbi *)> > m_Dbi
 

Additional Inherited Members

- Protected Member Functions inherited from CPubseqGatewayCacheBase
CLMDBReadOnlyTxn BeginReadTxn ()
 
- Protected Attributes inherited from CPubseqGatewayCacheBase
string m_FileName
 
unique_ptr< lmdb::envm_Env
 

Detailed Description

Definition at line 47 of file psg_cache_bioseq_info.hpp.

Constructor & Destructor Documentation

◆ CPubseqGatewayCacheBioseqInfo()

BEGIN_IDBLOB_SCOPE CPubseqGatewayCacheBioseqInfo::CPubseqGatewayCacheBioseqInfo ( const string file_name)
explicit

Definition at line 82 of file psg_cache_bioseq_info.cpp.

◆ ~CPubseqGatewayCacheBioseqInfo()

CPubseqGatewayCacheBioseqInfo::~CPubseqGatewayCacheBioseqInfo ( )
overridedefault

Member Function Documentation

◆ Fetch()

vector< CBioseqInfoRecord > CPubseqGatewayCacheBioseqInfo::Fetch ( CBioseqInfoFetchRequest const request)

◆ FetchLast()

vector< CBioseqInfoRecord > CPubseqGatewayCacheBioseqInfo::FetchLast ( void  )

◆ Open()

void CPubseqGatewayCacheBioseqInfo::Open ( void  )

◆ PackKey() [1/3]

string CPubseqGatewayCacheBioseqInfo::PackKey ( const string accession,
int  version 
)
static

◆ PackKey() [2/3]

string CPubseqGatewayCacheBioseqInfo::PackKey ( const string accession,
int  version,
int  seq_id_type 
)
static

◆ PackKey() [3/3]

string CPubseqGatewayCacheBioseqInfo::PackKey ( const string accession,
int  version,
int  seq_id_type,
int64_t  gi 
)
static

◆ ResetDbi()

void CPubseqGatewayCacheBioseqInfo::ResetDbi ( )
private

◆ UnpackKey() [1/2]

bool CPubseqGatewayCacheBioseqInfo::UnpackKey ( const char *  key,
size_t  key_sz,
int version,
int seq_id_type,
int64_t gi 
)
static

◆ UnpackKey() [2/2]

bool CPubseqGatewayCacheBioseqInfo::UnpackKey ( const char *  key,
size_t  key_sz,
string accession,
int version,
int seq_id_type,
int64_t gi 
)
static

◆ x_ExtractRecord()

bool CPubseqGatewayCacheBioseqInfo::x_ExtractRecord ( CBioseqInfoRecord record,
lmdb::val const value 
) const
private

◆ x_IsMatchingRecord()

bool CPubseqGatewayCacheBioseqInfo::x_IsMatchingRecord ( CBioseqInfoFetchRequest const request,
int  version,
int  seq_id_type,
int64_t  gi 
) const
private

◆ x_MakeLookupKey()

string CPubseqGatewayCacheBioseqInfo::x_MakeLookupKey ( CBioseqInfoFetchRequest const request) const
private

Member Data Documentation

◆ m_Dbi

unique_ptr<lmdb::dbi, function<void(lmdb::dbi*)> > CPubseqGatewayCacheBioseqInfo::m_Dbi
private

Definition at line 70 of file psg_cache_bioseq_info.hpp.

Referenced by Fetch(), FetchLast(), and Open().


The documentation for this class was generated from the following files:
Modified on Fri Jun 14 16:47:42 2024 by modify_doxy.py rev. 669887