44 #define REGISTER_READER_ENTRY_POINTS 1
45 #ifdef REGISTER_READER_ENTRY_POINTS
72 #define NCBI_USE_ERRCODE_X Objtools_GBLoader
96 #if defined(HAVE_PUBSEQ_OS)
103 #define GBLOADER_NAME "GBLOADER"
104 #define GBLOADER_HUP_NAME "GBLOADER-HUP"
106 #define DEFAULT_ID_GC_SIZE 10000
107 #define DEFAULT_ID_EXPIRATION_TIMEOUT 2*3600
178 return dynamic_cast<const CBlob_id&
>(*blob_id);
184 unique_ptr<TParamTree> app_params;
201 if ( !param.empty() ) {
213 if ( !param.empty() ) {
215 Uint4 timeout = NStr::StringToNumeric<Uint4>(param);
222 "Bad value of parameter "
224 ": \""<<param<<
"\"");
232 if ( !param.empty() ) {
238 "Bad value of parameter "
240 ": \""<<param<<
"\"");
248 if ( !param.empty() ) {
254 "Bad value of parameter "
256 ": \""<<param<<
"\"");
264 if ( !param.empty() ) {
270 "Bad value of parameter "
272 ": \""<<param<<
"\"");
280 if ( !param.empty() ) {
292 "Bad value of parameter "
294 ": \""<<param<<
"\"");
316 if ( !param.empty() ) {
339 if ( reader_name ==
"cache" ||
357 pair<string, string> ret;
364 if ( ret.first.empty() ) {
365 ret.first = TGenbankReaderName::GetDefault();
368 if (ret.second.empty()) {
371 if ( ret.second.empty() ) {
372 ret.second = TGenbankWriterName::GetDefault();
374 if ( ret.first.empty() || ret.second.empty() ) {
376 if ( method.empty() ) {
379 if ( method.empty() ) {
384 if ( ret.first.empty() ) {
388 ret.second =
"cache";
402 vector<string> str_list;
404 size_t reader_count = 0;
405 for (
size_t i = 0;
i < str_list.size(); ++
i ) {
418 if ( !reader_count ) {
420 "no reader available from "+
str);
422 return reader_count > 1 || str_list.size() > 1;
429 vector<string> str_list;
431 for (
size_t i = 0;
i < str_list.size(); ++
i ) {
434 "HUP GBLoader cannot have cache");
444 #ifdef REGISTER_READER_ENTRY_POINTS
455 #ifdef REGISTER_READER_ENTRY_POINTS
460 # ifdef HAVE_PUBSEQ_OS
475 #ifdef REGISTER_READER_ENTRY_POINTS
487 return !name.empty() && name[name.size()-1] !=
':';
496 CReader* ret = manager->CreateInstanceFromList(params, name);
501 "no reader available from "+name);
520 CWriter* ret = manager->CreateInstanceFromList(params, name);
525 "no writer available from "+name);
546 return TBlobId(it->GetBlob_id().GetPointer());
565 if ( !lock.IsLoaded() ) {
655 return loaded[0]? states[0]: kNotFound;
661 for (
size_t i = 0;
i < ids.size(); ++
i ) {
674 for (
size_t i = 0;
i < ids.size(); ++
i ) {
687 for (
size_t i = 0;
i < ids.size(); ++
i ) {
700 for (
size_t i = 0;
i < ids.size(); ++
i ) {
710 for (
size_t i = 0;
i < ids.size(); ++
i ) {
739 return lock.IsLoaded()? lock.
GetLength(): 0;
746 for (
size_t i = 0;
i < ids.size(); ++
i ) {
779 for (
size_t i = 0;
i < ids.size(); ++
i ) {
797 for (
size_t i = 0;
i < ids.size(); ++
i ) {
856 for (
size_t i = 0;
i < ids.size(); ++
i ) {
902 best = *sit; conflict=
false;
905 best = *sit; conflict=
false;
952 if ( !best || conflict ) {
953 _TRACE(
"CGBDataLoader::ResolveConflict("<<handle.
AsString()<<
"): "
963 if ((it->m_Type & cache_type) != 0) {
972 time_t access_timeout)
975 if ((it->m_Type & cache_type) != 0) {
976 it->m_Cache->Purge(access_timeout);
1077 mask |= (annots << 1);
1080 mask |= (annots << 2);
1162 int score1 = GetScore(id1);
1163 int score2 = GetScore(id2);
1164 if ( score1 != score2 ) {
1165 return score1 > score2;
1178 sort(ids.begin(), ids.end(), SBetterId());
1211 sort(ids.begin(), ids.end(), SBetterId());
1234 bool load_namedacc =
1236 if ( load_external || load_namedacc ) {
1238 if ( load_external ) {
1241 if ( load_namedacc ) {
1272 if ( !blobs.IsLoaded() ) {
1286 "blob state error for "+sih.
AsString(),
1302 "blob state error for "+blob_id.
ToString(),
1305 if ( processed_nas ) {
1306 if (
auto annot_info =
info.GetAnnotInfo() ) {
1307 for (
auto& acc : annot_info->GetNamedAnnotNames() ) {
1315 result.SaveLocksTo(locks);
1339 "blob state error for "+sih.
AsString(),
1345 if ( !
info.IsSetAnnotInfo() ) {
1360 const string& named_acc)
1383 "blob state error for "+sih.
AsString(),
1389 if ( !
info.IsSetAnnotInfo() ) {
1420 TChunkIdMap chunk_ids;
1427 chunk_ids[(*it)->GetBlobId()].push_back(
id);
1430 ITERATE(TChunkIdMap, it, chunk_ids) {
1485 :
t(&x), calibrating(x.NeedCalibration())
1487 if ( calibrating ) {
1493 if ( calibrating ) {
1512 loader->GetDispatcher(),
1513 loader->GetInfoManager()),
1611 if ((it->m_Type & cache_type) == 0) {
1614 if ( it->m_Cache->SameCacheParams(params) ) {
1615 return it->m_Cache.get();
const TId & GetId(void) const
Blob state exceptions, used by GenBank loader.
const TNamedAnnotNames & GetNamedAnnotNames(void) const
static CBlob_id * CreateFromString(const string &str)
string ToString(void) const
Get string representation of blob id.
CTSE_LoadLock GetTSE_LoadLock(const TBlobId &blob_id)
CTSE_LoadLock GetTSE_LoadLockIfLoaded(const TBlobId &blob_id)
vector< TBlobId > TLoadedBlob_ids
void GetLoadedBlob_ids(const CSeq_id_Handle &idh, TLoadedTypes types, TLoadedBlob_ids &blob_ids) const
TState GetState(void) const
TRegisterInfo GetRegisterInfo(void)
virtual void GetChunk(TChunk chunk) override
virtual TTSE_LockSet GetRecords(const CSeq_id_Handle &idh, EChoice choice) override
Request from a datasource using handles and ranges instead of seq-loc The TSEs loaded in this call wi...
virtual void GetTaxIds(const TIds &ids, TLoaded &loader, TTaxIds &ret) override
static CRef< TReaderManager > x_GetReaderManager(void)
TBlobContentsMask x_MakeContentMask(EChoice choice) const
CReader * x_CreateReader(const string &names, const CGBLoaderParams &gb_params, const TParamTree *params=0)
CGBDataLoader_Native(const string &loader_name, const CGBLoaderParams ¶ms)
virtual void GetSequenceTypes(const TIds &ids, TLoaded &loader, TSequenceTypes &ret) override
virtual TBlobVersion GetBlobVersion(const TBlobId &id) override
virtual void GetSequenceHashes(const TIds &ids, TLoaded &loader, TSequenceHashes &ret, THashKnown &known) override
virtual void GetAccVers(const TIds &ids, TLoaded &loader, TIds &ret) override
virtual TTSE_LockSet GetExternalAnnotRecordsNA(const CSeq_id_Handle &idh, const SAnnotSelector *sel, TProcessedNAs *processed_nas) override
virtual void GC(void) override
virtual TTSE_LockSet GetDetailedRecords(const CSeq_id_Handle &idh, const SRequestDetails &details) override
Request from a datasource using handles and ranges instead of seq-loc The TSEs loaded in this call wi...
virtual void GetSequenceStates(const TIds &ids, TLoaded &loader, TSequenceStates &ret) override
virtual void GetIds(const CSeq_id_Handle &idh, TIds &ids) override
virtual void DropTSE(CRef< CTSE_Info > tse_info) override
virtual TTSE_Lock ResolveConflict(const CSeq_id_Handle &handle, const TTSE_LockSet &tse_set) override
Resolve TSE conflict *select the best TSE from the set of dead TSEs.
virtual bool CanGetBlobById(void) const override
virtual TSeqPos GetSequenceLength(const CSeq_id_Handle &sih) override
Request for a length of a sequence.
virtual void GetChunks(const TChunkSet &chunks) override
virtual TNamedAnnotNames GetNamedAnnotAccessions(const CSeq_id_Handle &idh) override
CRef< CGBInfoManager > m_InfoManager
static TRegisterLoaderInfo RegisterInObjectManager(CObjectManager &om, const CGBLoaderParams ¶ms, CObjectManager::EIsDefault is_default=CObjectManager::eDefault, CObjectManager::TPriority priority=CObjectManager::kPriority_NotSet)
void x_CreateDriver(const CGBLoaderParams ¶ms)
void PurgeCache(TCacheType cache_type, time_t access_timeout=0) override
CInitMutexPool m_MutexPool
CWriter * x_CreateWriter(const string &names, const TParamTree *params=0)
static CRef< TWriterManager > x_GetWriterManager(void)
virtual void GetGis(const TIds &ids, TLoaded &loader, TGis &ret) override
void x_CreateWriters(const string &str, const TParamTree *params)
virtual TTSE_LockSet GetOrphanAnnotRecordsNA(const CSeq_id_Handle &idh, const SAnnotSelector *sel, TProcessedNAs *processed_nas) override
new Get*AnnotRecords() methods
virtual int GetSequenceState(const CSeq_id_Handle &idh) override
Request for a state of a sequence.
CGBReaderCacheManager m_CacheManager
TTSE_LockSet x_GetRecords(const CSeq_id_Handle &idh, TBlobContentsMask sr_mask, const SAnnotSelector *sel, TProcessedNAs *processed_nas=0)
virtual STypeFound GetSequenceTypeFound(const CSeq_id_Handle &sih) override
virtual TTaxId GetTaxId(const CSeq_id_Handle &idh) override
Request for a taxonomy id of a sequence.
CRef< CReadDispatcher > m_Dispatcher
virtual SGiFound GetGiFound(const CSeq_id_Handle &idh) override
virtual TBlobId GetBlobIdFromString(const string &str) const override
void CloseCache(void) override
virtual TTSE_LockSet GetExternalRecords(const CBioseq_Info &bioseq) override
Request from a datasource set of blobs with external annotations.
virtual ~CGBDataLoader_Native(void)
virtual void GetLabels(const TIds &ids, TLoaded &loader, TLabels &ret) override
virtual string GetLabel(const CSeq_id_Handle &idh) override
Request for a label string of a sequence.
virtual void GetSequenceLengths(const TIds &ids, TLoaded &loader, TSequenceLengths &ret) override
virtual SHashFound GetSequenceHashFound(const CSeq_id_Handle &idh) override
virtual TTSE_Lock GetBlobById(const TBlobId &id) override
bool x_CreateReaders(const string &str, const TParamTree *params, const CGBLoaderParams &gb_params, CGBLoaderParams::EPreopenConnection preopen)
virtual SAccVerFound GetAccVerFound(const CSeq_id_Handle &idh) override
virtual TBlobId GetBlobId(const CSeq_id_Handle &idh) override
virtual void GetBlobs(TTSE_LockSets &tse_sets) override
TRealBlobId x_GetRealBlobId(const TBlobId &blob_id) const override
pair< string, string > GetReaderWriterName(const TParamTree *params, const CGBLoaderParams &loader_params) const
bool HaveCache(TCacheType cache_type=fCache_Any) override
TExpirationTimeout m_IdExpirationTimeout
TRealBlobId GetRealBlobId(const TBlobId &blob_id) const
bool GetAddWGSMasterDescr(void) const
bool m_AlwaysLoadExternal
EGBErrorAction GetPTISErrorAction(void) const
bool HasHUPIncluded(void) const
static string x_GetLoaderMethod(const TParamTree *params)
TExpirationTimeout GetIdExpirationTimeout(void) const
static string GetParam(const TParamTree *params, const string ¶m_name)
EGBErrorAction m_PTISErrorAction
static TParamTree * GetLoaderParams(TParamTree *params)
bool m_AlwaysLoadNamedAcc
CReaderCacheManager::TCacheType TCacheType
const string & GetLoaderMethod(void) const
CReader * GetReaderPtr(void) const
EPreopenConnection GetPreopenConnection(void) const
const TParamTree * GetParamTree(void) const
CNullable< bool > m_EnableCDD
CNullable< bool > m_EnableSNP
const string & GetWebCookie(void) const
const string & GetWriterName(void) const
CNullable< bool > m_EnableWGS
const string & GetReaderName(void) const
virtual ICache * FindCache(ECacheType cache_type, const TCacheParams *params)
virtual TCaches & GetCaches(void)
virtual void RegisterCache(ICache &cache, ECacheType cache_type)
CReaderRequestResult TParent
CInitMutexPool & GetMutexPool(void)
virtual TExpirationTime GetIdExpirationTimeout(GBL::EExpirationType type) const override
virtual EGBErrorAction GetPTISErrorAction(void) const override
CGBDataLoader_Native & GetLoader(void)
CRef< CGBDataLoader_Native > m_Loader
virtual bool GetAddWGSMasterDescr(void) const override
~CGBReaderRequestResult(void)
virtual CTSE_LoadLock GetTSE_LoadLock(const TKeyBlob &blob_id) override
virtual CGBDataLoader_Native * GetLoaderPtr(void) override
virtual void GetLoadedBlob_ids(const CSeq_id_Handle &idh, TLoadedBlob_ids &blob_ids) const override
CGBReaderRequestResult(CGBDataLoader_Native *loader, const CSeq_id_Handle &requested_id)
virtual CTSE_LoadLock GetTSE_LoadLockIfLoaded(const TKeyBlob &blob_id) override
TData GetAccVer(void) const
bool IsLoadedAccVer(void) const
TData GetBlob_ids(void) const
bool IsLoadedBlobVersion(void) const
TData GetBlobVersion(void) const
bool IsLoadedBlob(void) const
CTSE_LoadLock & GetTSE_LoadLock(void)
bool IsLoadedGi(void) const
static TGi GetGi(const TData &data)
bool IsLoadedHash(void) const
static int GetHash(const TData &data)
bool IsLoadedLabel(void) const
TData GetLabel(void) const
TData GetLength(void) const
bool IsLoadedLength(void) const
TData GetSeq_ids(void) const
bool IsLoadedTaxId(void) const
TData GetTaxId(void) const
static CSeq_inst::TMol GetType(const TData &data)
bool IsLoadedType(void) const
Data loader exceptions, used by GenBank loader.
Base class for all object manager exceptions.
void LoadStates(CReaderRequestResult &result, const TIds &ids, TLoaded &loaded, TStates &ret)
void LoadBlobSet(CReaderRequestResult &result, const TIds &seq_ids)
void LoadChunks(CReaderRequestResult &result, const TBlobId &blob_id, const TChunkIds &chunk_ids)
void LoadSeq_idLabel(CReaderRequestResult &result, const CSeq_id_Handle &seq_id)
void LoadGis(CReaderRequestResult &result, const TIds &ids, TLoaded &loaded, TGis &ret)
void LoadBlobVersion(CReaderRequestResult &result, const TBlobId &blob_id, const CReader *asking_reader=0)
void InsertReader(TLevel level, CRef< CReader > reader)
void LoadLabels(CReaderRequestResult &result, const TIds &ids, TLoaded &loaded, TLabels &ret)
void LoadSeq_idGi(CReaderRequestResult &result, const CSeq_id_Handle &seq_id)
void InsertWriter(TLevel level, CRef< CWriter > writer)
void LoadSequenceType(CReaderRequestResult &result, const CSeq_id_Handle &seq_id)
void LoadAccVers(CReaderRequestResult &result, const TIds &ids, TLoaded &loaded, TIds &ret)
void LoadSequenceHash(CReaderRequestResult &result, const CSeq_id_Handle &seq_id)
void LoadLengths(CReaderRequestResult &result, const TIds &ids, TLoaded &loaded, TLengths &ret)
void LoadTaxIds(CReaderRequestResult &result, const TIds &ids, TLoaded &loaded, TTaxIds &ret)
void LoadHashes(CReaderRequestResult &result, const TIds &ids, TLoaded &loaded, THashes &ret, TKnown &known)
bool HasReaderWithHUPIncluded() const
void LoadTypes(CReaderRequestResult &result, const TIds &ids, TLoaded &loaded, TTypes &ret)
void LoadSeq_idTaxId(CReaderRequestResult &result, const CSeq_id_Handle &seq_id)
void LoadSeq_idSeq_ids(CReaderRequestResult &result, const CSeq_id_Handle &seq_id)
vector< CSeq_id_Handle > TIds
void LoadBlobs(CReaderRequestResult &result, const CSeq_id_Handle &seq_id, TContentsMask mask, const SAnnotSelector *sel)
void LoadSeq_idAccVer(CReaderRequestResult &result, const CSeq_id_Handle &seq_id)
void LoadSequenceLength(CReaderRequestResult &result, const CSeq_id_Handle &seq_id)
void LoadSeq_idBlob_ids(CReaderRequestResult &result, const CSeq_id_Handle &seq_id, const SAnnotSelector *sel)
void LoadChunk(CReaderRequestResult &result, const TBlobId &blob_id, TChunkId chunk_id)
void LoadBlob(CReaderRequestResult &result, const CBlob_id &blob_id)
static bool CannotProcess(const CSeq_id_Handle &sih)
vector< SReaderCacheInfo > TCaches
void SetEnableCDD(CNullable< bool > enable)
void SetEnableWGS(CNullable< bool > enable)
void SetEnableSNP(CNullable< bool > enable)
virtual TExpirationTime GetIdExpirationTimeout(GBL::EExpirationType type) const
vector< CBlob_id > TLoadedBlob_ids
GBL::CInfo_Base::TExpirationTime TExpirationTime
void OpenInitialConnection(bool force)
virtual void InitializeCache(CReaderCacheManager &cache_manager, const TPluginManagerParamTree *params)
virtual void SetIncludeHUP(bool include_hup=true, const string &web_cookie=NcbiEmptyString)
virtual void SetParams(const CReaderParams ¶ms)
TBlobId GetBlobId(void) const
TChunkId GetChunkId(void) const
TBlobState GetBlobState(void) const
definition of a Culling tree
static void LoadWGSMaster(CDataLoader *loader, CRef< CTSE_Chunk_Info > chunk)
virtual void InitializeCache(CReaderCacheManager &cache_manager, const TPluginManagerParamTree *params)
BLOB cache read/write/maintenance interface.
iterator_bool insert(const value_type &val)
static const struct name_t names[]
#define NCBI_GBLOADER_PARAM_PTIS_ERROR_ACTION
#define NCBI_GBLOADER_PARAM_ID_GC_SIZE
#define NCBI_GBLOADER_PARAM_ADD_WGS_MASTER
#define NCBI_GBLOADER_PARAM_PREOPEN
#define NCBI_GBLOADER_PARAM_READER_NAME
#define NCBI_GBLOADER_PARAM_ID_EXPIRATION_TIMEOUT
#define NCBI_GBLOADER_PARAM_WRITER_NAME
#define NCBI_GBLOADER_PARAM_PTIS_ERROR_ACTION_REPORT
#define NCBI_GBLOADER_PARAM_ALWAYS_LOAD_NAMED_ACC
#define NCBI_GBLOADER_PARAM_PTIS_ERROR_ACTION_IGNORE
#define NCBI_GBLOADER_PARAM_ALWAYS_LOAD_EXTERNAL
#define NCBI_GBLOADER_PARAM_PTIS_ERROR_ACTION_THROW
static bool s_ForceDriver(const string &name)
static const char *const DEFAULT_HUP_DRV_ORDER
static const bool s_LoadBulkBlobs
static const char *const DEFAULT_DRV_ORDER
NCBI_PARAM_DECL(string, GENBANK, READER_NAME)
NCBI_PARAM_DEF_EX(string, GENBANK, READER_NAME, "", eParam_NoThread, GENBANK_READER_NAME)
#define DEFAULT_ID_GC_SIZE
#define DEFAULT_ID_EXPIRATION_TIMEOUT
typedef NCBI_PARAM_TYPE(GENBANK, READER_NAME) TGenbankReaderName
#define GBLOG_POST_X(err_subcode, x)
static CNcbiApplicationGuard InstanceGuard(void)
Singleton method.
const CNcbiRegistry & GetConfig(void) const
Get the application's cached configuration parameters (read-only).
unsigned int TSeqPos
Type for sequence locations and lengths.
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
#define NON_CONST_ITERATE(Type, Var, Cont)
Non constant version of ITERATE macro.
SStrictId_Tax::TId TTaxId
Taxon id type.
const TSeqPos kInvalidSeqPos
Define special value for invalid sequence position.
#define NCBI_RETHROW_FMT(prev_exception, exception_class, err_code, message)
The same as NCBI_RETHROW but with message processed as output to ostream.
#define NCBI_THROW(exception_class, err_code, message)
Generic macro to throw an exception, given the exception class, error code and message string.
#define NCBI_THROW2(exception_class, err_code, message, extra)
Throw exception with extra parameter.
#define NCBI_THROW_FMT(exception_class, err_code, message)
The same as NCBI_THROW but with message processed as output to ostream.
static TParamTree * ConvertRegToTree(const IRegistry ®, NStr::ECase use_case=NStr::eNocase)
Reconstruct param tree from the application registry.
CConstRef< CSeq_id > GetSeqId(void) const
string AsString(void) const
const CTextseq_id * GetTextseq_Id(void) const
Return embedded CTextseq_id, if any.
vector< TSeqPos > TSequenceLengths
virtual EChoice DetailsToChoice(const SRequestDetails::TAnnotSet &annots) const
vector< CSeq_id_Handle > TIds
virtual TTSE_LockSet GetOrphanAnnotRecordsNA(const CSeq_id_Handle &idh, const SAnnotSelector *sel, TProcessedNAs *processed_nas)
new Get*AnnotRecords() methods
static void SetProcessedNA(const string &na, TProcessedNAs *processed_nas)
vector< bool > THashKnown
CDataSource * GetDataSource(void) const
virtual void GetTaxIds(const TIds &ids, TLoaded &loaded, TTaxIds &ret)
Bulk request for taxonomy ids of a set of sequences.
EChoice
main blob is blob with sequence all other blobs are external and contain external annotations
static bool IsRequestedAnyNA(const SAnnotSelector *sel)
vector< CSeq_inst::TMol > TSequenceTypes
virtual TTaxId GetTaxId(const CSeq_id_Handle &idh)
Request for a taxonomy id of a sequence.
EIsDefault
Flag defining if the data loader is included in the "default" group.
vector< bool > TLoaded
Bulk loading interface for a small pieces of information per id.
TAnnotBlobType m_AnnotBlobType
static void RegisterInObjectManager(CObjectManager &om, CLoaderMaker_Base &loader_maker, CObjectManager::EIsDefault is_default, CObjectManager::TPriority priority)
Register the loader only if the name is not yet registered in the object manager.
virtual void GetSequenceStates(const TIds &ids, TLoaded &loaded, TSequenceStates &ret)
Bulk request for states of a set of sequences.
vector< int > TSequenceStates
vector< int > TSequenceHashes
vector< TChunk > TChunkSet
@ eExtFeatures
external features
@ eExtAnnot
all external annotations
@ eExtAlign
external aligns
@ eAll
all blobs (main and external)
@ eOrphanAnnot
all external annotations if no Bioseq exists
@ eGraph
graph annotations from main blob
@ eCore
?only seq-entry core?
@ eAnnot
all annotations from main blob
@ eBioseq
main blob with complete bioseq
@ eAlign
aligns from main blob
@ eBioseqCore
main blob with bioseq core (no seqdata and annots)
@ eExtGraph
external graph annotations
@ eFeatures
features from main blob
string CombineWithZoomLevel(const string &acc, int zoom_level)
Combine accession string and zoom level into a string with separator.
SAnnotSelector & IncludeNamedAnnotAccession(const string &acc, int zoom_level=0)
bool ExtractZoomLevel(const string &full_name, string *acc_ptr, int *zoom_level_ptr)
Extract optional zoom level suffix from named annotation string.
@ eParam_NoThread
Do not use per-thread values.
uint32_t Uint4
4-byte (32-bit) unsigned integer
bool NotEmpty(void) const
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define END_SCOPE(ns)
End the previously defined scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
#define BEGIN_SCOPE(ns)
Define a new scope.
static bool StringToBool(const CTempString str)
Convert string to bool.
static list< string > & Split(const CTempString str, const CTempString delim, list< string > &arr, TSplitFlags flags=0, vector< SIZE_TYPE > *token_pos=NULL)
Split a string using specified delimiters.
static bool StartsWith(const CTempString str, const CTempString start, ECase use_case=eCase)
Check if a string starts with a specified prefix value.
static unsigned int StringToUInt(const CTempString str, TStringToNumFlags flags=0, int base=10)
Convert string to unsigned int.
static bool EqualNocase(const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2)
Case-insensitive equality of a substring with another string.
static string & ToLower(string &str)
Convert string to lower case – string& version.
bool IsSetAccession(void) const
Check if a value has been assigned to Accession data member.
bool IsGeneral(void) const
Check if variant General is selected.
bool IsLocal(void) const
Check if variant Local is selected.
bool IsSetVersion(void) const
Check if a value has been assigned to Version data member.
@ e_Gi
GenInfo Integrated Database.
constexpr auto sort(_Init &&init)
Defines the CNcbiApplication and CAppException classes for creating NCBI applications.
Multi-threading – classes, functions, and features.
Helper classes and templates to implement plugins.
void GenBankReaders_Register_Cache(void)
void GenBankWriters_Register_Cache(void)
void GenBankReaders_Register_Id1(void)
void GenBankReaders_Register_Id2(void)
CRef< objects::CObjectManager > om
static const char * str(char *buf, int n)
Better replacement of GetAccVer(), this method should be defined in data loaders, GetAccVer() is left...
Better replacement of GetGi(), this method should be defined in data loaders, GetGi() is left for com...
Better replacement of GetSequenceHash(), this method should be defined in data loaders,...
Better replacement of GetSequenceType(), this method should be defined in data loaders,...