NCBI C++ ToolKit
|
Search Toolkit Book for CId1Reader
#include <objtools/data_loaders/genbank/id1/reader_id1.hpp>
Protected Types | |
typedef map< TConn, CReaderServiceConnector::SConnInfo > | TConnections |
Protected Types inherited from CReader | |
typedef CReaderAllocatedConnection | CConn |
Protected Attributes | |
CReaderServiceConnector | m_Connector |
TConnections | m_Connections |
Protected Attributes inherited from CReader | |
CReadDispatcher * | m_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< TChunkId > | TChunkIds |
typedef vector< CSeq_id_Handle > | TSeqIds |
typedef vector< CBlob_Info > | TBlobIds |
typedef vector< CSeq_id_Handle > | TIds |
typedef vector< bool > | TLoaded |
typedef vector< TIds > | TBulkIds |
typedef vector< TGi > | TGis |
typedef vector< string > | TLabels |
typedef vector< TTaxId > | TTaxIds |
typedef vector< int > | TStates |
typedef vector< int > | THashes |
typedef vector< bool > | TKnown |
typedef vector< TSeqPos > | TLengths |
typedef vector< CSeq_inst::EMol > | TTypes |
typedef vector< CBlob_id > | TPlainBlobIds |
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< Uint8 > | TCounter |
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... | |
Definition at line 44 of file reader_id1.hpp.
|
protected |
Definition at line 112 of file reader_id1.hpp.
CId1Reader::CId1Reader | ( | int | max_connections = 0 | ) |
Definition at line 129 of file reader_id1.cpp.
References DEFAULT_NUM_CONN, ERR_POST_X_ONCE, and CReader::SetMaximumConnections().
CId1Reader::CId1Reader | ( | const TPluginManagerParamTree * | params, |
const string & | driver_name | ||
) |
Definition at line 137 of file reader_id1.cpp.
References DEFAULT_NUM_CONN, CConfig::eErr_NoThrow, ERR_POST_X_ONCE, CConfig::GetString(), CReader::InitParams(), CReaderServiceConnector::InitTimeouts(), kEmptyStr, m_Connector, NCBI, NCBI_GBLOADER_READER_ID1_PARAM_SERVICE_NAME, NCBI_PARAM_TYPE, and CReaderServiceConnector::SetServiceName().
CId1Reader::~CId1Reader | ( | ) |
Definition at line 159 of file reader_id1.cpp.
|
virtual |
Implements CId1ReaderBase.
Definition at line 652 of file reader_id1.cpp.
References conn, CId1ReaderBase::eSubSat_SNP, CProcessor::eType_ID1, CProcessor::eType_ID1_SNP, CReadDispatcher::GetProcessor(), CBlob_id::GetSubSat(), CLoadLockBlob::IsLoadedChunk(), CReader::m_Dispatcher, NCBI_RETHROW, CProcessor::ProcessStream(), result, x_ConnDescription(), x_GetConnection(), x_SendRequest(), and x_SetBlobRequest().
|
virtual |
Implements CId1ReaderBase.
Definition at line 562 of file reader_id1.cpp.
References GetBlobVersion(), and result.
|
virtual |
Implements CId1ReaderBase.
Definition at line 569 of file reader_id1.cpp.
References abs, CID1server_back_Base::e_Error, CID1server_back_Base::e_Gotblobinfo, CID1server_back_Base::e_Gotsewithinfo, ERR_POST_X, CBioseq_Handle::fState_dead, CID1SeqEntry_info_Base::GetBlob_info(), CID1blob_info_Base::GetBlob_state(), CID1server_back_Base::GetGotblobinfo(), CID1server_back_Base::GetGotsewithinfo(), NCBI_THROW, result, CReader::SetAndSaveBlobState(), CReader::SetAndSaveBlobVersion(), CID1server_request_Base::SetGetblobinfo(), dtl::version, CID1server_back_Base::Which(), x_ResolveId(), and x_SetParams().
Referenced by GetBlobState().
|
virtual |
bool CId1Reader::LoadGiBlob_ids | ( | CReaderRequestResult & | result, |
const CSeq_id_Handle & | seq_id, | ||
const SAnnotSelector * | sel | ||
) |
Definition at line 466 of file reader_id1.cpp.
References _ASSERT, CProcessor::ConvertGiFromOM(), CId1ReaderBase::CreateExtAnnotBlob_ids(), CSeq_id_Base::e_Gi, eEntry_complexities_entry, eTakeOwnership, fBlobHasAllLocal, CBioseq_Handle::fState_confidential, CBioseq_Handle::fState_dead, CBioseq_Handle::fState_other_error, CBioseq_Handle::fState_suppress_perm, CBioseq_Handle::fState_suppress_temp, CBioseq_Handle::fState_withdrawn, CSeq_id_Handle::GetGi(), CSeq_id_Base::GetGi(), CID1server_back_Base::GetGotblobinfo(), CSeq_id_Handle::GetSeqId(), GI_TO, info, CSeq_id_Handle::IsGi(), CID1server_back_Base::IsGotblobinfo(), LOG_POST_X, result, CReader::SetAndSaveNoSeq_idBlob_ids(), CReader::SetAndSaveSeq_idBlob_ids(), CID1server_request_Base::SetGetblobinfo(), CID1server_maxcomplex_Base::SetGi(), CID1server_maxcomplex_Base::SetMaxplex(), CLoadLockBlobIds::SetNoBlob_ids(), CProcessor::TrySNPSplit(), Warning(), CSeq_id_Handle::Which(), x_ResolveId(), and ZERO_GI.
Referenced by LoadSeq_idBlob_ids().
bool CId1Reader::LoadGiSeq_ids | ( | CReaderRequestResult & | result, |
const CSeq_id_Handle & | seq_id | ||
) |
Definition at line 341 of file reader_id1.cpp.
References _ASSERT, CSeq_id_Base::e_Gi, eTakeOwnership, CSeq_id_Handle::GetGi(), CSeq_id_Base::GetGi(), CSeq_id_Handle::GetHandle(), CID1server_back_Base::GetIds(), CSeq_id_Handle::GetSeqId(), CSeq_id_Handle::IsGi(), CID1server_back_Base::IsIds(), ITERATE, result, CReader::SetAndSaveNoSeq_idSeq_ids(), CReader::SetAndSaveSeq_idSeq_ids(), CID1server_request_Base::SetGetseqidsfromgi(), CSeq_id_Handle::Which(), x_ResolveId(), and ZERO_GI.
Referenced by LoadSeq_idSeq_ids().
|
virtual |
All LoadXxx() methods should return false if there is no requested data in the reader.
This will notify dispatcher that there is no sense to retry.
Reimplemented from CReader.
Definition at line 397 of file reader_id1.cpp.
References CProcessor::ConvertGiFromOM(), data, CSeq_id_Base::e_General, CSeq_id_Base::e_Gi, CId1ReaderBase::eSat_ANNOT, CId1ReaderBase::eSat_ANNOT_CDD, eTakeOwnership, fBlobHasAllLocal, CDbtag_Base::GetDb(), CLoadLockGi::GetGi(), CSeq_id_Handle::GetGiHandle(), SAnnotSelector::GetNamedAnnotAccessions(), CSeq_id_Handle::GetSeqId(), GI_FROM, GI_TO, SAnnotSelector::IsIncludedAnyNamedAnnotAccession(), LoadGiBlob_ids(), CReadDispatcher::LoadSeq_idBlob_ids(), CReader::LoadSeq_idBlob_ids(), CReadDispatcher::LoadSeq_idGi(), CReader::m_Dispatcher, result, CReader::SetAndSaveNoSeq_idBlob_ids(), CReader::SetAndSaveSeq_idBlob_ids(), CLoadLockBlobIds::SetLoadedBlob_ids(), sx_IsSNPOnly(), CSeq_id_Handle::Which(), and ZERO_GI.
|
virtual |
Reimplemented from CReader.
Definition at line 268 of file reader_id1.cpp.
References CID1server_back_Base::GetGotgi(), CSeq_id_Handle::GetSeqId(), CDataLoader::SGiFound::gi, CID1server_back_Base::IsGotgi(), CLoadLockGi::IsLoadedGi(), result, CDataLoader::SGiFound::sequence_found, CReader::SetAndSaveSeq_idGi(), CID1server_request_Base::SetGetgi(), x_ResolveId(), and ZERO_GI.
|
virtual |
Implements CReader.
Definition at line 292 of file reader_id1.cpp.
References data, CSeq_id_Base::e_General, CSeq_id_Base::e_Gi, eTakeOwnership, CDbtag_Base::GetDb(), CSeq_id_Base::GetGeneral(), CLoadLockGi::GetGi(), CSeq_id_Handle::GetGiHandle(), CObject_id::GetId8(), CSeq_id_Handle::GetSeqId(), CDbtag_Base::GetTag(), CLoadLockGi::IsFound(), LoadGiSeq_ids(), CReadDispatcher::LoadSeq_idGi(), CReadDispatcher::LoadSeq_idSeq_ids(), CReader::m_Dispatcher, result, CReader::SetAndSaveNoSeq_idSeq_ids(), CReader::SetAndSaveSeq_idSeq_ids(), CLoadLockSeqIds::SetLoadedSeq_ids(), and CSeq_id_Handle::Which().
|
protectedvirtual |
Implements CReader.
Definition at line 174 of file reader_id1.cpp.
References _ASSERT, conn, and m_Connections.
|
protected |
Definition at line 211 of file reader_id1.cpp.
References CReaderServiceConnector::GetConnDescription(), and m_Connector.
Referenced by GetBlob(), x_ConnectAtSlot(), x_ReceiveReply(), and x_SendRequest().
|
protectedvirtual |
Implements CReader.
Definition at line 217 of file reader_id1.cpp.
References conn, CONN_SetTimeout(), CReaderServiceConnector::Connect(), eIO_Close, eIO_ReadWrite, eTraceOpen, CConn_IOStream::GetCONN(), GetDebugLevel(), m_Connections, m_Connector, CReaderServiceConnector::SConnInfo::m_Stream, NCBI_THROW, STimeoutTag::sec, SetRandomFail, CReaderServiceConnector::SetTimeoutTo(), STimeoutTag::usec, and x_ConnDescription().
Reimplemented from CReader.
Definition at line 187 of file reader_id1.cpp.
References _ASSERT, conn, failed, m_Connections, m_Connector, CReaderServiceConnector::SConnInfo::m_Stream, CReaderServiceConnector::RememberIfBad(), AutoPtr< X, Del >::reset(), and CReader::x_ReportDisconnect().
|
protected |
Definition at line 199 of file reader_id1.cpp.
References _VERIFY, conn, AutoPtr< X, Del >::get(), m_Connections, CReaderServiceConnector::SConnInfo::m_Stream, and CReader::OpenConnection().
Referenced by GetBlob(), x_ReceiveReply(), and x_SendRequest().
|
protected |
|
protected |
Definition at line 756 of file reader_id1.cpp.
References Begin(), conn, eTraceASN, eTraceConn, GetDebugLevel(), in(), MSerial_AsnText, NCBI_RETHROW, CProcessor::OffsetAllGisToOM(), SetRandomFail, x_ConnDescription(), and x_GetConnection().
Referenced by x_ResolveId().
|
protectedvirtual |
Implements CReader.
Definition at line 181 of file reader_id1.cpp.
References _VERIFY, conn, map_checker< Container >::erase(), and m_Connections.
|
protected |
Definition at line 611 of file reader_id1.cpp.
References conn, CBioseq_Handle::fState_confidential, CBioseq_Handle::fState_no_data, CBioseq_Handle::fState_not_found, CBioseq_Handle::fState_withdrawn, CID1server_back_Base::GetError(), CID1server_back_Base::IsError(), NCBI_THROW_FMT, result, x_ReceiveReply(), and x_SendRequest().
Referenced by GetBlobVersion(), LoadGiBlob_ids(), LoadGiSeq_ids(), and LoadSeq_idGi().
Definition at line 711 of file reader_id1.cpp.
References conn, CID1server_request_Base::SetGetsefromgi(), x_SendRequest(), and x_SetParams().
|
protected |
Definition at line 719 of file reader_id1.cpp.
References Begin(), conn, eTraceASN, eTraceConn, GetDebugLevel(), MSerial_AsnText, NCBI_RETHROW, CProcessor::OffsetAllGisFromOM(), out(), SetRandomFail, x_ConnDescription(), and x_GetConnection().
Referenced by GetBlob(), x_ResolveId(), and x_SendRequest().
|
protected |
Definition at line 687 of file reader_id1.cpp.
References CID1server_request_Base::SetGetsewithinfo(), and x_SetParams().
Referenced by GetBlob().
|
protected |
Definition at line 694 of file reader_id1.cpp.
References eEntry_complexities_entry, CId1ReaderBase::GetExtAnnotGi(), CId1ReaderBase::GetExtAnnotSubSat(), CBlob_id::GetSat(), CBlob_id::GetSatKey(), GI_FROM, CId1ReaderBase::IsAnnotSat(), NStr::NumericToString(), CID1server_maxcomplex_Base::SetEnt(), CID1server_maxcomplex_Base::SetGi(), CID1server_maxcomplex_Base::SetMaxplex(), CID1server_maxcomplex_Base::SetSat(), and ZERO_GI.
Referenced by GetBlobVersion(), x_SendRequest(), and x_SetBlobRequest().
|
protected |
Definition at line 113 of file reader_id1.hpp.
Referenced by x_AddConnectionSlot(), x_ConnectAtSlot(), x_DisconnectAtSlot(), x_GetConnection(), and x_RemoveConnectionSlot().
|
protected |
Definition at line 110 of file reader_id1.hpp.
Referenced by CId1Reader(), x_ConnDescription(), x_ConnectAtSlot(), and x_DisconnectAtSlot().