m_Preopen(ePreopenByConfig),
94m_UsePSGInitialized(
false),
96m_PSGNoSplit(
false),
97m_HasHUPIncluded(
false)
204 #define NCBI_GBLOADER_PARAM_LOADER_PSG = "loader_psg" 205 #define NCBI_PSG_READER_NAME "psg" 211 if( method.empty() ) {
213method = TGenbankLoaderMethod::GetDefault();
221 booluse_psg =
false;
223vector<string> str_list;
225 for(
autos : str_list) {
227 #ifdef HAVE_PSG_LOADER 228 if(str_list.size() == 1) {
234 "'PSG' loader method can not be combined with other methods: '"+ loader_method +
"'");
238 "'PSG' loader method is not available: '"+ loader_method +
"'");
249 staticatomic<bool> initialized;
250 staticatomic<bool> loader_psg;
251 if( !initialized.load(memory_order_acquire) ) {
252 boolnew_value =
false;
253 #ifdef HAVE_PSG_LOADER 254 if( TGenbankLoaderPsg::GetDefault() ) {
261loader_psg.store(new_value, memory_order_relaxed);
262initialized.store(
true, memory_order_release);
264 returnloader_psg.load(memory_order_relaxed);
272 #ifdef HAVE_LOADER_PSG 274 if( !loader_psg_param.empty() ) {
280 "Cannot init GenBank loader, incorrect parameter format: " 282<<
". "<< ex.what());
287 if( !loader_method.empty() ) {
303 if(loader_method.empty()) {
306 if(loader_method.empty()) {
385 const string& reader_name,
418 const string& web_cookie,
429 const string& web_cookie)
438 const string& reader_name,
444is_default, priority);
456 const string& reader_name,
458 const string& web_cookie,
470 const string& web_cookie)
502 #if defined(HAVE_PSG_LOADER) 507 info.Set(
nullptr,
false);
522 if(web_cookie.empty()) {
527 md5.Update(web_cookie.data(), web_cookie.size());
539m_HasHUPIncluded(params.HasHUPIncluded()),
540m_WebCookie(params.GetWebCookie())
570TParams* FindSubNode(TParams* params,
576 constTParams* FindSubNode(
constTParams* params,
586 const string& subnode_name)
590 if( params->
KeyEqual(subnode_name) ) {
594subnode = FindSubNode(params, subnode_name);
603 const string& subnode_name)
607 if( params->
KeyEqual(subnode_name) ) {
611subnode = FindSubNode(params, subnode_name);
630 const string& reader_name)
645 const string& reader_name)
652 const string& param_name,
653 const string& param_value)
655 TParamTree* subnode = FindSubNode(params, param_name);
660subnode->
GetValue().value = param_value;
666 const string& param_name)
669 const TParamTree* subnode = FindSubNode(params, param_name);
TSatKey GetSatKey() const
CObjectManager::TPriority GetPriority(const TPluginManagerParamTree *params) const
CObjectManager::EIsDefault GetIsDefault(const TPluginManagerParamTree *params) const
bool ValidParams(const TPluginManagerParamTree *params) const
static TRegisterLoaderInfo RegisterInObjectManager(CObjectManager &om, const CGBLoaderParams ¶ms, CObjectManager::EIsDefault is_default=CObjectManager::eDefault, CObjectManager::TPriority priority=CObjectManager::kPriority_NotSet)
virtual TRealBlobId x_GetRealBlobId(const TBlobId &blob_id) const =0
static void SetParam(TParamTree *params, const string ¶m_name, const string ¶m_value)
CConstRef< CSeqref > GetSatSatkey(const CSeq_id_Handle &idh)
CGBDataLoader(const string &loader_name, const CGBLoaderParams ¶ms)
static TParamTree * GetReaderParams(TParamTree *params, const string &reader_name)
virtual bool GetTrackSplitSeq() const override
static string GetLoaderNameFromArgs(CReader *reader=0)
TRealBlobId GetRealBlobId(const TBlobId &blob_id) const
static TParamTree * GetParamsSubnode(TParamTree *params, const string &subnode_name)
bool HasHUPIncluded(void) const
virtual CObjectManager::TPriority GetDefaultPriority(void) const override
static bool IsUsingPSGLoader(void)
static string x_GetLoaderMethod(const TParamTree *params)
static string GetParam(const TParamTree *params, const string ¶m_name)
static TRegisterLoaderInfo RegisterInObjectManager(CObjectManager &om, CReader *reader=0, CObjectManager::EIsDefault is_default=CObjectManager::eDefault, CObjectManager::TPriority priority=CObjectManager::kPriority_NotSet)
virtual ~CGBDataLoader(void)
static TParamTree * GetLoaderParams(TParamTree *params)
const string & GetLoaderMethod(void) const
CReader * GetReaderPtr(void) const
EPreopenConnection m_Preopen
const string & GetLoaderName(void) const
const TParamTree * m_ParamTree
bool IsSetEnableCDD(void) const
void SetEnableSNP(bool enable)
const TParamTree * GetParamTree(void) const
CRef< CReader > m_ReaderPtr
CNullable< bool > m_EnableCDD
void SetEnableWGS(bool enable)
void SetParamTree(const TParamTree *params)
CNullable< bool > m_EnableSNP
void SetEnableCDD(bool enable)
bool IsSetEnableSNP(void) const
const string & GetWebCookie(void) const
bool GetEnableWGS(void) const
CNullable< bool > m_EnableWGS
bool HasHUPIncluded(void) const
bool GetEnableCDD(void) const
CGBLoaderParams & operator=(const CGBLoaderParams &)
const string & GetReaderName(void) const
void SetHUPIncluded(bool include_hup=true, const string &web_cookie=NcbiEmptyString)
bool GetEnableSNP(void) const
bool IsSetEnableWGS(void) const
void SetReaderPtr(CReader *reader_ptr)
virtual ~CGB_DataLoaderCF(void)
virtual CDataLoader * CreateAndRegister(CObjectManager &om, const TPluginManagerParamTree *params) const
Data loader exceptions, used by GenBank loader.
static TRegisterLoaderInfo RegisterInObjectManager(CObjectManager &om, CObjectManager::EIsDefault is_default=CObjectManager::eNonDefault, CObjectManager::TPriority priority=CObjectManager::kPriority_NotSet)
CDataSource & GetDataSource(void) const
const TBlobId & GetBlobId(void) const
definition of a Culling tree
static void md5(const char *src, const char *out)
NCBI_PARAM_DECL(bool, GENBANK, LOADER_PSG)
#define NCBI_GBLOADER_PARAM_LOADER_PSG
#define NCBI_PSG_READER_NAME
static bool s_GetDefaultUsePSG()
void DataLoaders_Register_GenBank(void)
#define GBLOADER_HUP_NAME
void NCBI_EntryPoint_DataLoader_GB(CPluginManager< CDataLoader >::TDriverInfoList &info_list, CPluginManager< CDataLoader >::EEntryPointRequest method)
void NCBI_EntryPoint_xloader_genbank(CPluginManager< objects::CDataLoader >::TDriverInfoList &info_list, CPluginManager< objects::CDataLoader >::EEntryPointRequest method)
static bool s_CheckPSGMethod(const string &loader_method)
typedef NCBI_PARAM_TYPE(GENBANK, LOADER_PSG) TGenbankLoaderPsg
NCBI_PARAM_DEF_EX(bool, GENBANK, LOADER_PSG, false, eParam_NoThread, GENBANK_LOADER_PSG)
#define NCBI_GBLOADER_PARAM_LOADER_METHOD
#define NCBI_GBLOADER_DRIVER_NAME
bool IsNull(void) const
Check if the object is unassigned.
const TValue & GetValue(void) const
Get a const reference to the current value.
#define ERR_POST_X(err_subcode, message)
Error posting with default error code and given error subcode.
void Critical(CExceptionArgs_Base &args)
#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_THROW_FMT(exception_class, err_code, message)
The same as NCBI_THROW but with message processed as output to ostream.
static CSeq_id_Handle GetHandle(const CSeq_id &id)
Normal way of getting a handle, works for any seq-id.
virtual CObjectManager::TPriority GetDefaultPriority(void) const
TLoader * GetLoader(void) const
Get pointer to the loader.
CDataSource * GetDataSource(void) const
EIsDefault
Flag defining if the data loader is included in the "default" group.
virtual TBlobId GetBlobId(const CSeq_id_Handle &idh)
TObjectType * GetNCPointerOrNull(void) const THROWS_NONE
Get pointer value.
CConstRef< C > ConstRef(const C *object)
Template function for conversion of const object pointer to CConstRef.
@ eParam_NoThread
Do not use per-thread values.
static void NCBI_EntryPointImpl(TDriverInfoList &info_list, EEntryPointRequest method)
Entry point implementation.
list< SDriverInfo > TDriverInfoList
List of driver information.
EEntryPointRequest
Actions performed by the entry point.
#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 SIZE_TYPE FindNoCase(const CTempString str, const CTempString pattern, SIZE_TYPE start, SIZE_TYPE end, EOccurrence which=eFirst)
Find the pattern in the specified range of a string using a case insensitive search.
static bool EqualNocase(const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2)
Case-insensitive equality of a substring with another string.
bool KeyEqual(const TKeyType &key) const
Check if the node's key is equal to the argument.
void AddNode(TTreeType *subnode)
Add new subnode.
const TTreeType * FindSubNode(const TKeyType &key) const
Non recursive linear scan of all subnodes, with key comparison.
const TValue & GetValue(void) const
Return node's value.
CMD5 - class for computing Message Digest version 5 checksums.
Defines the CNcbiApplication and CAppException classes for creating NCBI applications.
Multi-threading â classes, functions, and features.
Helper classes and templates to implement plugins.
CRef< objects::CObjectManager > om
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4