NCBI C++ ToolKit
Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
CId1Reader Class Reference

Search Toolkit Book for CId1Reader

#include <objtools/data_loaders/genbank/id1/reader_id1.hpp>

+ Inheritance diagram for CId1Reader:
+ Collaboration diagram for CId1Reader:

Public Member Functions

 CId1Reader (int max_connections=0)
 
 CId1Reader (const TPluginManagerParamTree *params, const string &driver_name)
 
 ~CId1Reader ()
 
int GetMaximumConnectionsLimit (void) const
 
bool LoadSeq_idGi (CReaderRequestResult &result, const CSeq_id_Handle &seq_id)
 
bool LoadSeq_idSeq_ids (CReaderRequestResult &result, const CSeq_id_Handle &id)
 
bool LoadGiSeq_ids (CReaderRequestResult &result, const CSeq_id_Handle &seq_id)
 
bool LoadSeq_idBlob_ids (CReaderRequestResult &result, const CSeq_id_Handle &id, const SAnnotSelector *sel)
 All LoadXxx() methods should return false if there is no requested data in the reader. More...
 
bool LoadGiBlob_ids (CReaderRequestResult &result, const CSeq_id_Handle &seq_id, const SAnnotSelector *sel)
 
void GetBlobState (CReaderRequestResult &result, const CBlob_id &blob_id)
 
void GetBlobVersion (CReaderRequestResult &result, const CBlob_id &blob_id)
 
void GetBlob (CReaderRequestResult &result, const TBlobId &blob_id, TChunkId chunk_id)
 
- Public Member Functions inherited from CId1ReaderBase
 CId1ReaderBase (void)
 
 ~CId1ReaderBase (void)
 
bool LoadBlob (CReaderRequestResult &result, const TBlobId &blob_id)
 
bool LoadBlobState (CReaderRequestResult &result, const TBlobId &blob_id)
 
bool LoadBlobVersion (CReaderRequestResult &result, const TBlobId &blob_id)
 
bool LoadChunk (CReaderRequestResult &result, const TBlobId &blob_id, TChunkId chunk_id)
 
- Public Member Functions inherited from CReader
 CReader (void)
 
virtual ~CReader (void)
 
void InitParams (CConfig &conf, const string &driver_name, int default_max_conn)
 
virtual bool LoadSeq_idAccVer (CReaderRequestResult &result, const CSeq_id_Handle &seq_id)
 
virtual bool LoadSeq_idLabel (CReaderRequestResult &result, const CSeq_id_Handle &seq_id)
 
virtual bool LoadSeq_idTaxId (CReaderRequestResult &result, const CSeq_id_Handle &seq_id)
 
virtual bool LoadSequenceHash (CReaderRequestResult &result, const CSeq_id_Handle &seq_id)
 
virtual bool LoadSequenceLength (CReaderRequestResult &result, const CSeq_id_Handle &seq_id)
 
virtual bool LoadSequenceType (CReaderRequestResult &result, const CSeq_id_Handle &seq_id)
 
virtual bool LoadBulkIds (CReaderRequestResult &result, const TIds &ids, TLoaded &loaded, TBulkIds &ret)
 
virtual bool LoadAccVers (CReaderRequestResult &result, const TIds &ids, TLoaded &loaded, TIds &ret)
 
virtual bool LoadGis (CReaderRequestResult &result, const TIds &ids, TLoaded &loaded, TGis &ret)
 
virtual bool LoadLabels (CReaderRequestResult &result, const TIds &ids, TLoaded &loaded, TLabels &ret)
 
virtual bool LoadTaxIds (CReaderRequestResult &result, const TIds &ids, TLoaded &loaded, TTaxIds &ret)
 
virtual bool LoadHashes (CReaderRequestResult &result, const TIds &ids, TLoaded &loaded, THashes &ret, TKnown &known)
 
virtual bool LoadLengths (CReaderRequestResult &result, const TIds &ids, TLoaded &loaded, TLengths &ret)
 
virtual bool LoadTypes (CReaderRequestResult &result, const TIds &ids, TLoaded &loaded, TTypes &ret)
 
virtual bool LoadStates (CReaderRequestResult &result, const TIds &ids, TLoaded &loaded, TStates &ret)
 
virtual bool LoadBlobs (CReaderRequestResult &result, const CSeq_id_Handle &seq_id, TContentsMask mask, const SAnnotSelector *sel)
 
virtual bool LoadBlobs (CReaderRequestResult &result, const CLoadLockBlobIds &lock, TContentsMask mask, const SAnnotSelector *sel)
 
virtual bool LoadBlob (CReaderRequestResult &result, const CBlob_Info &blob_info)
 
virtual bool LoadChunks (CReaderRequestResult &result, const TBlobId &blob_id, const TChunkIds &chunk_ids)
 
virtual bool LoadChunks (CReaderRequestResult &result, const TBlobChunkIds &chunk_ids)
 
virtual bool LoadBlobSet (CReaderRequestResult &result, const TSeqIds &seq_ids)
 
virtual bool LoadBlobs (CReaderRequestResult &result, const TBlobIds &blob_infos)
 
void SetAndSaveSeq_idSeq_ids (CReaderRequestResult &result, const CSeq_id_Handle &seq_id, const CFixedSeq_ids &seq_ids) const
 
void SetAndSaveNoSeq_idSeq_ids (CReaderRequestResult &result, const CSeq_id_Handle &seq_id, TState state) const
 
void SetAndSaveSeq_idAccVer (CReaderRequestResult &result, const CSeq_id_Handle &seq_id, const TSequenceAcc &acc_id) const
 
void SetAndSaveSeq_idGi (CReaderRequestResult &result, const CSeq_id_Handle &seq_id, const TSequenceGi &gi) const
 
void SetAndSaveSeq_idAccFromSeqIds (CReaderRequestResult &result, const CSeq_id_Handle &seq_id, const CLoadLockSeqIds &seq_ids) const
 
void SetAndSaveSeq_idGiFromSeqIds (CReaderRequestResult &result, const CSeq_id_Handle &seq_id, const CLoadLockSeqIds &seq_ids) const
 
void SetAndSaveSeq_idSeq_ids (CReaderRequestResult &result, const CSeq_id_Handle &seq_id, const CLoadLockSeqIds &seq_ids) const
 
void SetAndSaveNoSeq_idSeq_ids (CReaderRequestResult &result, const CSeq_id_Handle &seq_id, const CLoadLockGi &gi_lock) const
 
void SetAndSaveSeq_idBlob_ids (CReaderRequestResult &result, const CSeq_id_Handle &seq_id, const SAnnotSelector *sel, CLoadLockBlobIds &lock, const CLoadLockBlobIds &blob_ids) const
 
void SetAndSaveNoSeq_idBlob_ids (CReaderRequestResult &result, const CSeq_id_Handle &seq_id, const SAnnotSelector *sel, const CLoadLockGi &gi_lock) const
 
void SetAndSaveSeq_idTaxId (CReaderRequestResult &result, const CSeq_id_Handle &seq_id, TTaxId taxid) const
 
void SetAndSaveSequenceHash (CReaderRequestResult &result, const CSeq_id_Handle &seq_id, const TSequenceHash &hash) const
 
void SetAndSaveSequenceLength (CReaderRequestResult &result, const CSeq_id_Handle &seq_id, TSeqPos length) const
 
void SetAndSaveSequenceType (CReaderRequestResult &result, const CSeq_id_Handle &seq_id, const TSequenceType &type) const
 
void SetAndSaveSeq_idBlob_ids (CReaderRequestResult &result, const CSeq_id_Handle &seq_id, const SAnnotSelector *sel, const CFixedBlob_ids &blob_ids) const
 
void SetAndSaveNoSeq_idBlob_ids (CReaderRequestResult &result, const CSeq_id_Handle &seq_id, const SAnnotSelector *sel, TBlobState state) const
 
void SetAndSaveBlobState (CReaderRequestResult &result, const TBlobId &blob_id, TBlobState blob_state) const
 
void SetAndSaveBlobVersion (CReaderRequestResult &result, const TBlobId &blob_id, TBlobVersion version) const
 
void SetAndSaveNoBlob (CReaderRequestResult &result, const TBlobId &blob_id, TChunkId chunk_id, TBlobState blob_state)
 
void SetAndSaveSeq_idLabelFromSeqIds (CReaderRequestResult &result, const CSeq_id_Handle &seq_id, const CLoadLockSeqIds &seq_ids) const
 
void SetAndSaveSeq_idLabel (CReaderRequestResult &result, const CSeq_id_Handle &seq_id, const string &label) const
 
void SetAndSaveSeq_idBlob_ids (CReaderRequestResult &result, const CSeq_id_Handle &seq_id, const SAnnotSelector *sel, CLoadLockBlobIds &lock, const CFixedBlob_ids &blob_ids) const
 
void SetAndSaveNoSeq_idBlob_ids (CReaderRequestResult &result, const CSeq_id_Handle &seq_id, const SAnnotSelector *sel, CLoadLockBlobIds &lock, TBlobState state) const
 
int SetMaximumConnections (int max)
 
void SetMaximumConnections (int max, int default_max)
 
int GetMaximumConnections (void) const
 
void SetPreopenConnection (bool preopen=true)
 
bool GetPreopenConnection (void) const
 
void OpenInitialConnection (bool force)
 
virtual int GetConst (const string &const_name) const
 
void SetMaximumRetryCount (int retry_count)
 
virtual int GetRetryCount (void) const
 
virtual bool MayBeSkippedOnErrors (void) const
 
virtual void InitializeCache (CReaderCacheManager &cache_manager, const TPluginManagerParamTree *params)
 
virtual void ResetCache (void)
 
virtual void OpenConnection (TConn conn)
 
virtual void WaitBeforeNewConnection (TConn conn)
 
virtual void ConnectSucceeds (TConn conn)
 
virtual void ConnectFailed (TConn conn)
 
virtual void SetNewConnectionDelayMicroSec (unsigned long micro_sec)
 
virtual void SetIncludeHUP (bool include_hup=true, const string &web_cookie=NcbiEmptyString)
 
bool HasHUPIncluded () const
 
virtual void SetParams (const CReaderParams &params)
 
- 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 Types

typedef map< TConn, CReaderServiceConnector::SConnInfoTConnections
 
- Protected Types inherited from CReader
typedef CReaderAllocatedConnection CConn
 

Protected Member Functions

virtual void x_AddConnectionSlot (TConn conn)
 
virtual void x_RemoveConnectionSlot (TConn conn)
 
virtual void x_DisconnectAtSlot (TConn conn, bool failed)
 
virtual void x_ConnectAtSlot (TConn conn)
 
string x_ConnDescription (CConn_IOStream &stream) const
 
CConn_IOStreamx_GetConnection (TConn conn)
 
TBlobState x_ResolveId (CReaderRequestResult &result, CID1server_back &id1_reply, CID1server_request &id1_request)
 
void x_SendRequest (TConn conn, CID1server_request &request)
 
void x_ReceiveReply (TConn conn, CID1server_back &reply)
 
void x_SendRequest (const CBlob_id &blob_id, TConn conn)
 
void x_SetParams (CID1server_maxcomplex &params, const CBlob_id &blob_id)
 
void x_SetBlobRequest (CID1server_request &request, const CBlob_id &blob_id)
 
CRef< CTSE_Infox_ReceiveMainBlob (CConn_IOStream *stream)
 
- Protected Member Functions inherited from CReader
void x_ReportDisconnect (const char *reader, const char *server, TConn conn, bool failed) const
 
void x_SetIncludeHUP (bool include_hup)
 
- Protected Member Functions inherited from CObject
virtual void DeleteThis (void)
 Virtual method "deleting" this object. More...
 

Protected Attributes

CReaderServiceConnector m_Connector
 
TConnections m_Connections
 
- Protected Attributes inherited from CReader
CReadDispatcherm_Dispatcher
 

Additional Inherited Members

- Public Types inherited from CId1ReaderBase
enum  ESat {
  eSat_ANNOT_CDD = 10 , eSat_ANNOT = 26 , eSat_TRACE = 28 , eSat_TRACE_ASSM = 29 ,
  eSat_TR_ASSM_CH = 30 , eSat_TRACE_CHGR = 31
}
 
enum  ESubSat {
  eSubSat_main = 0 , eSubSat_SNP = 1<<0 , eSubSat_SNP_graph = 1<<2 , eSubSat_CDD = 1<<3 ,
  eSubSat_MGC = 1<<4 , eSubSat_HPRD = 1<<5 , eSubSat_STS = 1<<6 , eSubSat_tRNA = 1<<7 ,
  eSubSat_microRNA = 1<<8 , eSubSat_Exon = 1<<9
}
 
- Public Types inherited from CReader
typedef unsigned TConn
 
typedef CBlob_id TBlobId
 
typedef int TState
 
typedef int TBlobState
 
typedef int TBlobVersion
 
typedef int TBlobSplitVersion
 
typedef int TChunkId
 
typedef int TContentsMask
 
typedef vector< TChunkIdTChunkIds
 
typedef vector< CSeq_id_HandleTSeqIds
 
typedef vector< CBlob_InfoTBlobIds
 
typedef vector< CSeq_id_HandleTIds
 
typedef vector< boolTLoaded
 
typedef vector< TIdsTBulkIds
 
typedef vector< TGiTGis
 
typedef vector< stringTLabels
 
typedef vector< TTaxIdTTaxIds
 
typedef vector< intTStates
 
typedef vector< intTHashes
 
typedef vector< boolTKnown
 
typedef vector< TSeqPosTLengths
 
typedef vector< CSeq_inst::EMolTTypes
 
typedef vector< CBlob_idTPlainBlobIds
 
typedef vector< pair< TBlobId, TChunkIds > > TBlobChunkIds
 
typedef CDataLoader::SAccVerFound TSequenceAcc
 
typedef CDataLoader::SGiFound TSequenceGi
 
typedef CDataLoader::STypeFound TSequenceType
 
typedef CDataLoader::SHashFound TSequenceHash
 
- 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...
 
- Static Public Member Functions inherited from CId1ReaderBase
static bool IsAnnotSat (int sat)
 
static ESat GetAnnotSat (int subsat)
 
static void CreateExtAnnotBlob_ids (TBlobIds &blob_ids, TIntId gi, int ext_feat)
 
static int GetNextExtAnnotBit (int &ext_feat)
 
static void SetExtAnnotBlob_id (CBlob_id &blob_id, TIntId gi, int bit)
 
static TIntId GetExtAnnotGi (const CBlob_id &blob_id)
 
static int GetExtAnnotSubSat (const CBlob_id &blob_id)
 
- Static Public Member Functions inherited from CReader
static int ReadInt (CNcbiIstream &stream)
 
- 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 44 of file reader_id1.hpp.

Member Typedef Documentation

◆ TConnections

Definition at line 112 of file reader_id1.hpp.

Constructor & Destructor Documentation

◆ CId1Reader() [1/2]

CId1Reader::CId1Reader ( int  max_connections = 0)

◆ CId1Reader() [2/2]

CId1Reader::CId1Reader ( const TPluginManagerParamTree params,
const string driver_name 
)

◆ ~CId1Reader()

CId1Reader::~CId1Reader ( )

Definition at line 159 of file reader_id1.cpp.

Member Function Documentation

◆ GetBlob()

void CId1Reader::GetBlob ( CReaderRequestResult result,
const TBlobId blob_id,
TChunkId  chunk_id 
)
virtual

◆ GetBlobState()

void CId1Reader::GetBlobState ( CReaderRequestResult result,
const CBlob_id blob_id 
)
virtual

Implements CId1ReaderBase.

Definition at line 562 of file reader_id1.cpp.

References GetBlobVersion(), and result.

◆ GetBlobVersion()

void CId1Reader::GetBlobVersion ( CReaderRequestResult result,
const CBlob_id blob_id 
)
virtual

◆ GetMaximumConnectionsLimit()

int CId1Reader::GetMaximumConnectionsLimit ( void  ) const
virtual

Reimplemented from CReader.

Definition at line 164 of file reader_id1.cpp.

References MAX_MT_CONN.

◆ LoadGiBlob_ids()

bool CId1Reader::LoadGiBlob_ids ( CReaderRequestResult result,
const CSeq_id_Handle seq_id,
const SAnnotSelector sel 
)

◆ LoadGiSeq_ids()

bool CId1Reader::LoadGiSeq_ids ( CReaderRequestResult result,
const CSeq_id_Handle seq_id 
)

◆ LoadSeq_idBlob_ids()

bool CId1Reader::LoadSeq_idBlob_ids ( CReaderRequestResult result,
const CSeq_id_Handle seq_id,
const SAnnotSelector sel 
)
virtual

◆ LoadSeq_idGi()

bool CId1Reader::LoadSeq_idGi ( CReaderRequestResult result,
const CSeq_id_Handle seq_id 
)
virtual

◆ LoadSeq_idSeq_ids()

bool CId1Reader::LoadSeq_idSeq_ids ( CReaderRequestResult result,
const CSeq_id_Handle id 
)
virtual

◆ x_AddConnectionSlot()

void CId1Reader::x_AddConnectionSlot ( TConn  conn)
protectedvirtual

Implements CReader.

Definition at line 174 of file reader_id1.cpp.

References _ASSERT, conn, and m_Connections.

◆ x_ConnDescription()

string CId1Reader::x_ConnDescription ( CConn_IOStream stream) const
protected

◆ x_ConnectAtSlot()

void CId1Reader::x_ConnectAtSlot ( TConn  conn)
protectedvirtual

◆ x_DisconnectAtSlot()

void CId1Reader::x_DisconnectAtSlot ( TConn  conn,
bool  failed 
)
protectedvirtual

◆ x_GetConnection()

CConn_IOStream * CId1Reader::x_GetConnection ( TConn  conn)
protected

◆ x_ReceiveMainBlob()

CRef<CTSE_Info> CId1Reader::x_ReceiveMainBlob ( CConn_IOStream stream)
protected

◆ x_ReceiveReply()

void CId1Reader::x_ReceiveReply ( TConn  conn,
CID1server_back reply 
)
protected

◆ x_RemoveConnectionSlot()

void CId1Reader::x_RemoveConnectionSlot ( TConn  conn)
protectedvirtual

Implements CReader.

Definition at line 181 of file reader_id1.cpp.

References _VERIFY, conn, map_checker< Container >::erase(), and m_Connections.

◆ x_ResolveId()

CReader::TBlobVersion CId1Reader::x_ResolveId ( CReaderRequestResult result,
CID1server_back id1_reply,
CID1server_request id1_request 
)
protected

◆ x_SendRequest() [1/2]

void CId1Reader::x_SendRequest ( const CBlob_id blob_id,
TConn  conn 
)
protected

◆ x_SendRequest() [2/2]

void CId1Reader::x_SendRequest ( TConn  conn,
CID1server_request request 
)
protected

◆ x_SetBlobRequest()

void CId1Reader::x_SetBlobRequest ( CID1server_request request,
const CBlob_id blob_id 
)
protected

Definition at line 687 of file reader_id1.cpp.

References CID1server_request_Base::SetGetsewithinfo(), and x_SetParams().

Referenced by GetBlob().

◆ x_SetParams()

void CId1Reader::x_SetParams ( CID1server_maxcomplex params,
const CBlob_id blob_id 
)
protected

Member Data Documentation

◆ m_Connections

TConnections CId1Reader::m_Connections
protected

◆ m_Connector

CReaderServiceConnector CId1Reader::m_Connector
protected

Definition at line 110 of file reader_id1.hpp.

Referenced by CId1Reader(), x_ConnDescription(), x_ConnectAtSlot(), and x_DisconnectAtSlot().


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