vector<string>& args,
71 static const STimeoutfive_seconds = { 5, 0 };
74 if( !
data.empty() ) {
97 return "Phrase not found";
99 return "Field not found";
101 return "Phrase ignored";
103 return "Quoted phrase not found";
105 return "Output message";
107 return "Unknown error";
111 template<
classT>
static void s_FormatIds(ostream& osm,
constvector<T>& uids) {
115 for(
autoit = uids.begin()+1; it != uids.end(); ++it) {
124 for(
autoit = uids.begin(); it != uids.end(); ++it) {
125 if(it != uids.begin()) {
132 "Argument list contains seq-ids of mixed types");
139 "Argument list contains seq-ids of mixed types");
142osm << seh.GetSeqId()->GetSeqIdString(
true);
153 for(
autoit = uids.begin()+1; it != uids.end(); ++it) {
157osm <<
"&idtype=acc";
162 returnNStr::StringToNumeric<T>(
str);
187 const string& message)
const 201 const string& message)
const 217 const string& message)
const 224!IsTaxidQuery(message))
272: m_HasError(
false)
276 bool HasError(
void)
const{
returnm_HasError; }
277 void GetErrors(list<string>& errors) { errors = m_Errors; }
280 bool error(
const string& message)
289m_Text_chunks.clear();
291 if( !m_Path.empty() ) {
300 bool result= OnEndElement();
302string::size_type pos = m_Path.find_last_of(
"/");
303 if(pos != string::npos) {
309 bool text(
const string& contents)
311m_Text_chunks.push_back(contents);
339: m_MessageHandler(message_handler)
362 ITERATE(list<TMessage>,
i, m_ResultWarnings) {
364 i->first,
i->second);
366m_ResultWarnings.clear();
367 ITERATE(list<TMessage>,
i, m_ResultErrors) {
369 i->first,
i->second);
371m_ResultErrors.clear();
375 typedefpair<CEUtilsException::EErrCode, string>
TMessage;
380string::size_type pos = s.rfind(suffix);
381 return(pos != string::npos && pos == s.size() - strlen(suffix));
387 stringcontents = GetText();
389 if(m_Path ==
"eSearchResult/Count") {
392 else if(x_IsSuffix(m_Path,
"/IdList/Id")) {
393m_Uids.push_back(s_ParseId<T>(contents));
395 else if(x_IsSuffix(m_Path,
"/ErrorList/PhraseNotFound")) {
397m_ResultErrors.push_back(message);
399 else if(x_IsSuffix(m_Path,
"/ErrorList/FieldNotFound")) {
401m_ResultErrors.push_back(message);
403 else if(x_IsSuffix(m_Path,
"/WarningList/PhraseIgnored")) {
405m_ResultWarnings.push_back(message);
407 else if(x_IsSuffix(m_Path,
"/WarningList/QuotedPhraseNotFound")) {
409m_ResultWarnings.push_back(message);
411 else if(x_IsSuffix(m_Path,
"/WarningList/OutputMessage")) {
413m_ResultWarnings.push_back(message);
415 else if(m_Path ==
"ERROR"|| m_Path ==
"eSearchResult/ERROR") {
417m_Errors.push_back(contents);
446: m_LinkName(dbfrom +
"_"+ dbto)
448, m_InLinkSet(
false)
455m_LinkName = link_name;
464 if(name ==
"LinkSetDb") {
465m_InLinkSet =
false;
473 if( GetText() == m_LinkName) {
478m_Uids.push_back(s_ParseId<T>( GetText() ));
494 #define EUTILS_CLIENT_SECTION "eutils_client" 496 #define DEFAULT_RETMAX 100000000 498 #define DEFAULT_MAX_RETRIES 9 499 #define DEFAULT_WAIT_TIME 0 500 #define DEFAULT_WAIT_TIME_MULTIPLIER 1 501 #define DEFAULT_WAIT_TIME_INCREMENT 0.5 502 #define DEFAULT_WAIT_TIME_MAX 3 517 "wait_time_multiplier",
522 "wait_time_increment",
540: m_CachedHostNameCount(0),
608 if(!max_retries.empty()) {
610 m_MaxRetries= NStr::StringToNumeric<unsigned int>(max_retries);
613 ERR_POST(
"Invalid max_retries value: "<< max_retries);
618 if(!timeout.empty()) {
623 ERR_POST(
"Invalid conn_timeout value: "<< timeout);
632 template<
classCall>
642 catch( exception& exc ) {
649 LOG_POST(
Warning<<
"CEutilsClient: waiting "<< wait_sec <<
"s before retry");
662params +=
"&retmode=xml&retmax=1";
668 LOG_POST(
Trace<<
"Executing: db="<< db <<
" query="<< term);
676 "failed to execute query: "+ term);
685 stringpath =
"/entrez/eutils/esearch.fcgi";
701 "error parsing xml: "+ msgs.
print());
719vector<CSeq_id_Handle>& uids)
725vector<string>& uids)
731vector<TEntrezId>& uids)
746 "error parsing xml: "+ msgs.
print());
755 "error returned from query: "+
msg);
771vector<CSeq_id_Handle>& uids)
777vector<string>& uids)
783vector<TEntrezId>& uids)
795 "failed to open file: "+ xml_file);
804 const string& xml_path)
806 return x_Search(db, term, uids, xml_path);
812vector<CSeq_id_Handle>& uids,
813 const string& xml_path)
815 return x_Search(db, term, uids, xml_path);
820vector<string>& uids,
821 const string& xml_path)
823 return x_Search(db, term, uids, xml_path);
829vector<TEntrezId>& uids,
830 const string& xml_path)
832 return x_Search(db, term, uids, xml_path);
839 const string& xml_path)
844params +=
"&retmode=xml";
852params +=
"&idtype=gi";
854params +=
"&idtype=acc";
858 LOG_POST(
Trace<<
"Executing: db="<< db <<
" query="<< term);
863 return CallWithRetry(bind(&CEutilsClient::x_SearchOnce<T>,
this, cref(params), ref(uids), cref(xml_path)),
"Search");
867 "failed to execute query: "+ term);
877 const string& xml_path)
881 stringpath =
"/entrez/eutils/esearch.fcgi";
890 if(!xml_path.empty()) {
899 "Failure while writing entrez xml response" 900 " to file: "+ xml_file);
934oss <<
"&usehistory=y";
937 x_Get(
"/entrez/eutils/esearch.fcgi", oss.str(), ostr);
943 const string& web_env,
959oss <<
"&usehistory=y" 966 const string& web_env,
973 if( query_key > 0 ) {
978 x_Get(
"/entrez/eutils/esearch.fcgi", oss.str(), ostr);
983 const string& web_env,
990oss <<
"&query_key="<< query_key <<
"&idtype=acc";
992 x_Get(
"/entrez/eutils/esearch.fcgi", oss.str(), ostr);
997 const string& web_env,
998 const string& query_key,
1004oss <<
"&query_key="<< query_key <<
"&idtype=acc";
1006 x_Get(
"/entrez/eutils/esearch.fcgi", oss.str(), ostr);
1010 #define HOST_NAME_REFRESH_FREQ 100 1028 static const charkEutils[] =
"eutils.ncbi.nlm.nih.gov";
1029 static const charkEutilsLB[] =
"eutils_lb";
1043 stringscheme(
"http");
1047 buf,
sizeof(
buf), kEutils);
1048host =
string(web && *web ? web : kEutils);
1058 string const& params,
1063 stringextra_params{ params };
1070 msg<<
"Failed to execute request: " 1086istr << extra_params;
1088ostringstream reply;
1092 stringreply_str = reply.str();
1093istringstream reply_istr(reply.str());
1094vector<TEntrezId> uids;
1108 const string& db_to,
1109 constvector<int>& uids_from,
1110vector<int>& uids_to,
1111 const string& xml_path,
1115 x_Link(db_from, db_to, uids_from, uids_to, xml_path,
command);
1120 const string& db_to,
1121 constvector<CSeq_id_Handle>& uids_from,
1122vector<CSeq_id_Handle>& uids_to,
1123 const string& xml_path,
1126 x_Link(db_from, db_to, uids_from, uids_to, xml_path,
command);
1130 const string& db_to,
1131 constvector<string>& uids_from,
1132vector<string>& uids_to,
1133 const string& xml_path,
1136 x_Link(db_from, db_to, uids_from, uids_to, xml_path,
command);
1140 const string& db_to,
1141 constvector<TEntrezId>& uids_from,
1142vector<TEntrezId>& uids_to,
1143 const string& xml_path,
1146 x_Link(db_from, db_to, uids_from, uids_to, xml_path,
command);
1151 const string& db_to,
1152 constvector<int>& uids_from,
1153vector<TEntrezId>& uids_to,
1154 const string& xml_path,
1157 x_Link(db_from, db_to, uids_from, uids_to, xml_path,
command);
1161 const string& db_to,
1162 constvector<TEntrezId>& uids_from,
1163vector<int>& uids_to,
1164 const string& xml_path,
1167 x_Link(db_from, db_to, uids_from, uids_to, xml_path,
command);
1172 const string& db_to,
1173 constvector<TEntrezId>& uids_from,
1174vector<CSeq_id_Handle>& uids_to,
1175 const string& xml_path,
1178 x_Link(db_from, db_to, uids_from, uids_to, xml_path,
command);
1182 const string& db_to,
1183 constvector<CSeq_id_Handle>& uids_from,
1184vector<TEntrezId>& uids_to,
1185 const string& xml_path,
1188 x_Link(db_from, db_to, uids_from, uids_to, xml_path,
command);
1191 template<
classT1,
classT2>
1193 const string& db_to,
1194 constvector<T1>& uids_from,
1195vector<T2>& uids_to,
1196 const string& xml_path,
1199std::ostringstream oss;
1206 stringparams = oss.str();
1214cref(db_from), cref(db_to), ref(uids_to), cref(xml_path), cref(params)),
"Link");
1218 "failed to execute elink request: "+ params);
1225 const string& db_to,
1227 const string& xml_path,
1228 const string& params)
1230 stringpath =
"/entrez/eutils/elink.fcgi";
1243 if(!xml_path.empty()) {
1251parser.
parse_file(xml_file.c_str(), &msgs);
1254 "Failure while writing entrez xml response" 1255 " to file: "+ xml_file);
1270 "error parsing xml: "+ msgs.
print());
1277 const string& db_to,
1278 constvector<int>& uids_from,
1287 const string& db_to,
1288 constvector<CSeq_id_Handle>& uids_from,
1296 const string& db_to,
1297 constvector<string>& uids_from,
1305 const string& db_to,
1306 constvector<TEntrezId>& uids_from,
1315 const string& db_to,
1316 constvector<T>& uids_from,
1320std::ostringstream oss;
1327 stringparams = oss.str();
1337 "failed to execute elink request: "+ params);
1344 stringpath =
"/entrez/eutils/elink.fcgi";
1359 const string& db_to,
1360 const string& web_env,
1364std::ostringstream oss;
1369<<
"&WebEnv="<< web_env
1370<<
"&query_key="<< query_key;
1372 x_Get(
"/entrez/eutils/elink.fcgi", oss.str(), ostr);
1376 const string& db_to,
1377 const string& web_env,
1381std::ostringstream oss;
1386<<
"&WebEnv="<< web_env
1387<<
"&query_key="<< query_key
1390 x_Get(
"/entrez/eutils/elink.fcgi", oss.str(), ostr);
1394 const string& db_to,
1395 const string& web_env,
1396 const string& query_key,
1399std::ostringstream oss;
1404<<
"&WebEnv="<< web_env
1405<<
"&query_key="<< query_key
1408 x_Get(
"/entrez/eutils/elink.fcgi", oss.str(), ostr);
1413 constvector<int>& uids,
1415 const string&
cmd)
1423 constvector<objects::CSeq_id_Handle>& uids,
1425 const string&
cmd)
1431 constvector<string>& uids,
1433 const string&
cmd)
1439 constvector<TEntrezId>& uids,
1441 const string&
cmd)
1447 constvector<T>& uids,
1449 const string&
cmd)
1456 stringparams = oss.str();
1466 "failed to execute esummary request: "+ params);
1473 stringpath =
"/entrez/eutils/elink.fcgi?";
1475 stringurl =
x_BuildUrl(hostname, path, params);
1480 m_Url.push_back(url);
1489 stringdocstr(sb.str());
1499 constvector<int>& uids,
1508 constvector<CSeq_id_Handle>& uids,
1516 constvector<string>& uids,
1524 constvector<TEntrezId>& uids,
1533 constvector<T>& uids,
1545 stringparams = oss.str();
1555 "failed to execute esummary request: "+ params);
1562 stringpath =
"/entrez/eutils/esummary.fcgi?";
1564 stringurl =
x_BuildUrl(hostname, path, params);
1569 m_Url.push_back(url);
1578 stringdocstr(sb.str());
1582docsums.
swap(xmldoc);
1588 const string& web_env,
1595<<
"&WebEnv="<< web_env;
1597 if( retstart > 0 ) {
1598oss <<
"&retstart="<< retstart;
1602oss <<
"&retmax="<< retmax;
1612 const string& web_env,
1620oss <<
"&query_key="<< query_key;
1621 x_Get(
"/entrez/eutils/esummary.fcgi?", oss.str(), ostr);
1625 const string& web_env,
1633oss <<
"&query_key="<< query_key
1635 x_Get(
"/entrez/eutils/esummary.fcgi?", oss.str(), ostr);
1639 const string& web_env,
1640 const string& query_key,
1647oss <<
"&query_key="<< query_key
1649 x_Get(
"/entrez/eutils/esummary.fcgi?", oss.str(), ostr);
1654 constvector<int>& uids,
1656 const string& retmode)
1658 x_Fetch(db, uids, ostr, retmode);
1663 constvector<CSeq_id_Handle>& uids,
1665 const string& retmode)
1667 x_Fetch(db, uids, ostr, retmode);
1671 constvector<string>& uids,
1673 const string& retmode)
1675 x_Fetch(db, uids, ostr, retmode);
1679 constvector<TEntrezId>& uids,
1681 const string& retmode)
1683 x_Fetch(db, uids, ostr, retmode);
1688 constvector<T>& uids,
1690 const string& retmode)
1697 stringparams = oss.str();
1707 "failed to execute efetch request: "+ params);
1714 stringpath =
"/entrez/eutils/efetch.fcgi";
1730 switch(content_type) {
1748 const string& web_env,
1755<<
"&WebEnv="<< web_env;
1756 if( retstart > 0 ) {
1757oss <<
"&retstart="<< retstart;
1761oss <<
"&retmax="<< retmax;
1766 const string& web_env,
1774oss <<
"&query_key="<< query_key;
1776 x_Get(
"/entrez/eutils/efetch.fcgi", oss.str(), ostr);
1780 const string& web_env,
1783EContentType content_type,
1788oss <<
"&query_key="<< query_key
1791 x_Get(
"/entrez/eutils/efetch.fcgi", oss.str(), ostr);
1795 const string& web_env,
1796 const string& query_key,
1803oss <<
"&query_key="<< query_key
1806 x_Get(
"/entrez/eutils/efetch.fcgi", oss.str(), ostr);
1820 const string¶ms)
1822 stringurl = host + path;
1823 if(!params.empty()) {
1824url +=
'?'+ params;
1835oss <<
'&'<< param.first <<
'='<< param.second;
1837params += oss.str();
Helper hook-up class that installs default logging/registry/locking (but only if they have not yet be...
This stream exchanges data with an HTTP server located at the URL: http[s]://host[:port]/path[?...
CConn_PipeStream for command piping.
void SetLinkName(const string &link_name)
bool end_element(const string &name)
CELinkParser(const string &dbfrom, const string &dbto, vector< T > &uids)
pair< CEUtilsException::EErrCode, string > TMessage
CEutilsClient::CMessageHandler & m_MessageHandler
list< TMessage > m_ResultErrors
List of error messages from the E-Utils request.
Uint8 GetCount(void) const
bool x_IsSuffix(const string &s, const char *suffix)
CESearchParser(vector< T > &uids, CEutilsClient::CMessageHandler &message_handler)
void ProcessMessages(void)
Processes the warning and error messages from E-Utils, delivering them to the message handler and cle...
list< TMessage > m_ResultWarnings
List of warning messages from the E-Utils request.
virtual const char * GetErrCodeString(void) const override
Get error code interpreted as text.
bool end_element(const string &name)
void GetErrors(list< string > &errors)
virtual bool OnEndElement(void)
bool text(const string &contents)
string GetText(void) const
bool start_element(const string &name, const attrs_type &attrs)
list< string > m_Errors
List of parsing errors.
list< string > m_Text_chunks
bool error(const string &message)
bool HasError(void) const
Subclass this to override how messages (warnings and errors) are handled.
const list< CTime > GetTime(void) const
void LinkOut(const string &db, const vector< objects::CSeq_id_Handle > &uids, xml::document &docsums, const string &cmd="llinks")
Uint8 x_CountOnce(const string ¶ms)
void Fetch(const string &db, const vector< objects::CSeq_id_Handle > &uids, CNcbiOstream &ostr, const string &retmode="xml")
void SetMaxReturn(int ret_max)
int m_CachedHostNameCount
CRef< CMessageHandler > m_MessageHandler
void x_SummaryOnce(xml::document &docsums, const string ¶ms)
void SearchHistory(const string &db, const string &term, const string &web_env, Int8 query_key, int retstart, CNcbiOstream &ostr)
Uint8 Search(const string &db, const string &term, vector< objects::CSeq_id_Handle > &uids, const string &xml_path=kEmptyStr)
TParamList m_AdditionalParams
const list< string > GetUrl(void) const
static string x_BuildUrl(const string &host, const string &path, const string ¶ms)
void x_AddAdditionalParameters(string ¶ms)
void x_Fetch(const string &db, const vector< T > &uids, CNcbiOstream &ostr, const string &retmode="xml")
void x_Summary(const string &db, const vector< T > &uids, xml::document &docsums, const string &version="")
void AddParameter(const string &name, const string &value)
CIncreasingTime m_WaitTime
void Summary(const string &db, const vector< objects::CSeq_id_Handle > &uids, xml::document &docsums, const string &version="")
unsigned int m_MaxRetries
void SetLinkName(const string &link_name)
void ClearAddedParameters()
void x_Link(const string &db_from, const string &db_to, const vector< T1 > &uids_from, vector< T2 > &uids_to, const string &xml_path, const string &command)
Uint8 x_Search(const string &db, const string &term, vector< T > &uids, const string &xml_path=kEmptyStr)
void x_FetchOnce(CNcbiOstream &ostr, const string ¶ms)
std::invoke_result< Call >::type CallWithRetry(Call &&call, const char *name)
void SetMessageHandlerDiagPost(void)
Equivalent to: ERR_POST(Warning|Error << ...).
void x_Get(string const &path, string const ¶ms, CNcbiOstream &ostr)
Uint8 x_ParseSearchResults(const string &xml_file, vector< T > &uids)
void x_LinkOnce(CNcbiOstream &ostr, const string ¶ms)
void SetMessageHandlerThrowOnError(void)
Equivalent to: NCBI_THROW, ERR_POST, LOG_POST as appropriate.
void Link(const string &db_from, const string &db_to, const vector< objects::CSeq_id_Handle > &uids_from, vector< objects::CSeq_id_Handle > &uids_to, const string &xml_path=kEmptyStr, const string &command="neighbor")
const string & x_GetHostName(void) const
void x_LinkOnceT(const string &db_from, const string &db_to, vector< T > &uids_to, const string &xml_path, const string ¶ms)
void SetMessageHandler(CMessageHandler &message_handler)
Set custom message handler.
void x_GetOnce(string const &path, string const &extra_params, CNcbiOstream &ostr)
void SetMessageHandlerDefault(void)
Default is to log all messages at informational level.
void SetUserTag(const string &tag)
Uint8 x_SearchOnce(const string ¶ms, vector< T > &uids, const string &xml_path)
Uint8 ParseSearchResults(CNcbiIstream &istr, vector< objects::CSeq_id_Handle > &uids)
void FetchHistory(const string &db, const string &web_env, Int8 query_key, int retstart, EContentType content_type, CNcbiOstream &ostr)
void LinkHistory(const string &db_from, const string &db_to, const string &web_env, Int8 query_key, CNcbiOstream &ostr)
Uint8 Count(const string &db, const string &term)
void x_LinkOutOnce(xml::document &doc, const string ¶ms)
void SummaryHistory(const string &db, const string &web_env, Int8 query_key, int retstart, const string &version, CNcbiOstream &ostr)
void x_LinkOut(const string &db, const vector< T > &uids, xml::document &doc, const string &cmd)
double GetTime(int step) const
void Init(CConfig &conf, const string &driver_name, const SAllParams ¶ms)
virtual void HandleMessage(EDiagSev severity, CEUtilsException::EErrCode err_code, const string &message) const
Pure virtual function, to be implemented by subclass.
virtual void HandleMessage(EDiagSev severity, CEUtilsException::EErrCode err_code, const string &message) const
Pure virtual function, to be implemented by subclass.
bool IsTaxidQuery(const string &message) const
virtual void HandleMessage(EDiagSev severity, CEUtilsException::EErrCode err_code, const string &message) const
Pure virtual function, to be implemented by subclass.
container_type::value_type value_type
The xml::document class is used to hold the XML tree and various bits of information about it.
void swap(document &other)
Swap one xml::document object for another.
The xml::error_messages class is used to store all the error message which are collected while parsin...
bool has_fatal_errors(void) const
Check if there are fatal errors in the error messages.
bool has_errors(void) const
Check if there are errors in the error messages.
std::string print(void) const
Convert error messages into a single printable string.
The xml::event_parser is used to parse an XML document by calling member functions when certain thing...
std::map< std::string, std::string > attrs_type
a type for holding XML node attributes
bool parse_stream(std::istream &stream, error_messages *messages, warnings_as_errors_type how=type_warnings_not_errors)
Parse what ever data that can be read from the given stream.
bool parse_file(const char *filename, error_messages *messages, warnings_as_errors_type how=type_warnings_not_errors)
Call this member function to parse the given file.
The NCBI C++ standard methods for dealing with std::string.
void s_FormatIds< string >(ostream &osm, const vector< string > &uids)
static const char * s_GetErrCodeString(CEUtilsException::TErrCode err_code)
#define DEFAULT_WAIT_TIME_MAX
static CIncreasingTime::SAllParams s_WaitTimeParams
string s_ParseId< string >(const string &str)
void s_FormatIds< CSeq_id_Handle >(ostream &osm, const vector< CSeq_id_Handle > &uids)
static void s_SearchHistoryQuery(ostringstream &oss, const string &db, const string &term, const string &web_env, int retstart, int retmax)
#define DEFAULT_WAIT_TIME_MULTIPLIER
CSeq_id_Handle s_ParseId< CSeq_id_Handle >(const string &str)
static string s_GetContentType(CEutilsClient::EContentType content_type)
#define DEFAULT_WAIT_TIME_INCREMENT
static void s_FetchHistoryQuery(ostream &oss, const string &db, const string &web_env, int retstart, int retmax, CEutilsClient::EContentType content_type)
#define HOST_NAME_REFRESH_FREQ
#define EUTILS_CLIENT_SECTION
static void s_SummaryHistoryQuery(ostream &oss, const string &db, const string &web_env, int retstart, const string version, int retmax)
static void s_FormatIds(ostream &osm, const vector< T > &uids)
#define DEFAULT_MAX_RETRIES
#define DEFAULT_WAIT_TIME
static T s_ParseId(const string &str)
This file contains the definition of the xml::event_parser class.
static const char * str(char *buf, int n)
static CNcbiApplicationGuard InstanceGuard(void)
Singleton method.
const CNcbiRegistry & GetConfig(void) const
Get the application's cached configuration parameters (read-only).
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
int GetStatusCode(void) const
Get the last seen HTTP status code, if available.
CPipe & GetPipe(void)
Return an underlying CPipe; it's valid for as long as the stream exists.
@ fHTTP_AutoReconnect
See HTTP_CreateConnectorEx()
#define DIAG_COMPILE_INFO
Make compile time diagnostic information object to use in CNcbiDiag and CException.
const CNcbiDiag & GetRef(void) const
Some compilers (e.g.
static const char * SeverityName(EDiagSev sev)
Get a common symbolic name for the severity levels.
#define ERR_POST(message)
Error posting with file, line number information but without error codes.
EDiagSev
Severity level for the posted diagnostics.
#define LOG_POST(message)
This macro is deprecated and it's strongly recomended to move in all projects (except tests) to macro...
@ eDiag_Error
Error message.
@ eDiag_Warning
Warning message.
@ eDiag_Fatal
Fatal error â guarantees exit(or abort)
@ eDiag_Critical
Critical error message.
void Error(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.
void Trace(CExceptionArgs_Base &args)
void Warning(CExceptionArgs_Base &args)
virtual const char * what(void) const noexcept
Standard report (includes full backlog).
void Info(CExceptionArgs_Base &args)
static CSeq_id_Handle GetHandle(const CSeq_id &id)
Normal way of getting a handle, works for any seq-id.
EIO_Status CloseHandle(EChildIOHandle handle)
Close the specified child's pipe handle (even for CPipe opened with OpenSelf()).
@ fStdErr_Share
Keep stderr (share it with child)
uint32_t Uint4
4-byte (32-bit) unsigned integer
int64_t Int8
8-byte (64-bit) signed integer
uint64_t Uint8
8-byte (64-bit) unsigned integer
virtual string GetString(const string §ion, const string &name, const string &default_value, TFlags flags=0) const
Get the parameter string value.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
SSERV_Info * SERV_GetInfo(const char *service, TSERV_Type types, unsigned int preferred_host, const SConnNetInfo *net_info)
Same as "SERV_GetInfoEx(., ., ., ., 0, 0, 0)" â i.e.
static string ntoa(const CNCBI_IPAddr &addr)
BSD-like API.
IO_PREFIX::ofstream CNcbiOfstream
Portable alias for ofstream.
IO_PREFIX::ostream CNcbiOstream
Portable alias for ostream.
IO_PREFIX::istream CNcbiIstream
Portable alias for istream.
IO_PREFIX::ifstream CNcbiIfstream
Portable alias for ifstream.
bool NcbiStreamCopy(CNcbiOstream &os, CNcbiIstream &is)
Copy the entire contents of stream "is" to stream "os".
size_t NcbiStreamToString(string *s, CNcbiIstream &is, size_t pos=0)
Input the entire contents of an istream into a string (NULL causes drain).
static bool EndsWith(const CTempString str, const CTempString end, ECase use_case=eCase)
Check if a string ends with a specified suffix value.
static double StringToDouble(const CTempStringEx str, TStringToNumFlags flags=0)
Convert string to double.
static string Join(const TContainer &arr, const CTempString &delim)
Join strings using the specified delimiter.
static bool StartsWith(const CTempString str, const CTempString start, ECase use_case=eCase)
Check if a string starts with a specified prefix value.
static Uint8 StringToUInt8(const CTempString str, TStringToNumFlags flags=0, int base=10)
Convert string to Uint8.
static unsigned int StringToUInt(const CTempString str, TStringToNumFlags flags=0, int base=10)
Convert string to unsigned int.
static enable_if< is_arithmetic< TNumeric >::value||is_convertible< TNumeric, Int8 >::value, string >::type NumericToString(TNumeric value, TNumToStringFlags flags=0, int base=10)
Convert numeric value to string.
static string URLEncode(const CTempString str, EUrlEncode flag=eUrlEnc_SkipMarkChars)
URL-encode string.
static string & ToLower(string &str)
Convert string to lower case â string& version.
@ fDecimalPosixOrLocal
StringToDouble*(): For decimal point, try both C and current locale.
void Set(EType type)
Set special value.
@ eCurrent
Use current time. See also CCurrentTime.
@ eDefault
Default timeout (to be interpreted by the client code)
const STimeout * g_CTimeoutToSTimeout(const CTimeout &cto, STimeout &sto)
CTimeout/STimeout adapters.
const char * ConnNetInfo_GetValue(const char *service, const char *param, char *value, size_t value_size, const char *def_value)
SConnNetInfo * ConnNetInfo_Create(const char *service)
void ConnNetInfo_Destroy(SConnNetInfo *net_info)
E_Choice
Choice variants.
@ e_Gi
GenInfo Integrated Database.
@ e_not_set
No variant selected.
const string version
version string
string Execute(const string &cmmd, const vector< string > &args, const string &data=kEmptyStr)
const GenericPointer< typename T::ValueType > T2 value
Parameters initialization model.
void SleepMilliSec(unsigned long ml_sec, EInterruptOnSignal onsignal=eRestartOnSignal)
Defines the CNcbiApplication and CAppException classes for creating NCBI applications.
static SLJIT_INLINE sljit_ins msg(sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b)
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