A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/doxyhtml/eutils__client_8cpp_source.html below:

NCBI C++ ToolKit: src/misc/eutils_client/eutils_client.cpp Source File

43 #include <misc/error_codes.hpp> 49 #include <type_traits> 51 #define NCBI_USE_ERRCODE_X Misc_EutilsClient 66  const

vector<string>& args,

71  static const STimeout

five_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

<

class

T>

static void s_FormatIds

(ostream& osm,

const

vector<T>& uids) {

115  for

(

auto

it = uids.begin()+1; it != uids.end(); ++it) {

124  for

(

auto

it = 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"

);

142

osm << seh.GetSeqId()->GetSeqIdString(

true

);

153  for

(

auto

it = uids.begin()+1; it != uids.end(); ++it) {

157

osm <<

"&idtype=acc"

;

162  return

NStr::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

{

return

m_HasError; }

277  void GetErrors

(list<string>& errors) { errors = m_Errors; }

280  bool error

(

const string

& message)

289

m_Text_chunks.clear();

291  if

( !m_Path.empty() ) {

300  bool result

= OnEndElement();

302

string::size_type pos = m_Path.find_last_of(

"/"

);

303  if

(pos != string::npos) {

309  bool text

(

const string

& contents)

311

m_Text_chunks.push_back(contents);

339

: m_MessageHandler(message_handler)

362  ITERATE

(list<TMessage>,

i

, m_ResultWarnings) {

364  i

->first,

i

->second);

366

m_ResultWarnings.clear();

367  ITERATE

(list<TMessage>,

i

, m_ResultErrors) {

369  i

->first,

i

->second);

371

m_ResultErrors.clear();

375  typedef

pair<CEUtilsException::EErrCode, string>

TMessage

;

380

string::size_type pos = s.rfind(suffix);

381  return

(pos != string::npos && pos == s.size() - strlen(suffix));

387  string

contents = GetText();

389  if

(m_Path ==

"eSearchResult/Count"

) {

392  else if

(x_IsSuffix(m_Path,

"/IdList/Id"

)) {

393

m_Uids.push_back(s_ParseId<T>(contents));

395  else if

(x_IsSuffix(m_Path,

"/ErrorList/PhraseNotFound"

)) {

397

m_ResultErrors.push_back(message);

399  else if

(x_IsSuffix(m_Path,

"/ErrorList/FieldNotFound"

)) {

401

m_ResultErrors.push_back(message);

403  else if

(x_IsSuffix(m_Path,

"/WarningList/PhraseIgnored"

)) {

405

m_ResultWarnings.push_back(message);

407  else if

(x_IsSuffix(m_Path,

"/WarningList/QuotedPhraseNotFound"

)) {

409

m_ResultWarnings.push_back(message);

411  else if

(x_IsSuffix(m_Path,

"/WarningList/OutputMessage"

)) {

413

m_ResultWarnings.push_back(message);

415  else if

(m_Path ==

"ERROR"

|| m_Path ==

"eSearchResult/ERROR"

) {

417

m_Errors.push_back(contents);

446

: m_LinkName(dbfrom +

"_"

+ dbto)

448

, m_InLinkSet(

false

)

455

m_LinkName = link_name;

464  if

(name ==

"LinkSetDb"

) {

465

m_InLinkSet =

false

;

473  if

( GetText() == m_LinkName) {

478

m_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

<

class

Call>

642  catch

( exception& exc ) {

649  LOG_POST

(

Warning

<<

"CEutilsClient: waiting "

<< wait_sec <<

"s before retry"

);

662

params +=

"&retmode=xml&retmax=1"

;

668  LOG_POST

(

Trace

<<

"Executing: db="

<< db <<

" query="

<< term);

676  "failed to execute query: "

+ term);

685  string

path =

"/entrez/eutils/esearch.fcgi"

;

701  "error parsing xml: "

+ msgs.

print

());

719

vector<CSeq_id_Handle>& uids)

725

vector<string>& uids)

731

vector<TEntrezId>& uids)

746  "error parsing xml: "

+ msgs.

print

());

755  "error returned from query: "

+

msg

);

771

vector<CSeq_id_Handle>& uids)

777

vector<string>& uids)

783

vector<TEntrezId>& uids)

795  "failed to open file: "

+ xml_file);

804  const string

& xml_path)

806  return x_Search

(db, term, uids, xml_path);

812

vector<CSeq_id_Handle>& uids,

813  const string

& xml_path)

815  return x_Search

(db, term, uids, xml_path);

820

vector<string>& uids,

821  const string

& xml_path)

823  return x_Search

(db, term, uids, xml_path);

829

vector<TEntrezId>& uids,

830  const string

& xml_path)

832  return x_Search

(db, term, uids, xml_path);

839  const string

& xml_path)

844

params +=

"&retmode=xml"

;

852

params +=

"&idtype=gi"

;

854

params +=

"&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  string

path =

"/entrez/eutils/esearch.fcgi"

;

890  if

(!xml_path.empty()) {

899  "Failure while writing entrez xml response" 900  " to file: "

+ xml_file);

934

oss <<

"&usehistory=y"

;

937  x_Get

(

"/entrez/eutils/esearch.fcgi"

, oss.str(), ostr);

943  const string

& web_env,

959

oss <<

"&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,

990

oss <<

"&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,

1004

oss <<

"&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 char

kEutils[] =

"eutils.ncbi.nlm.nih.gov"

;

1029  static const char

kEutilsLB[] =

"eutils_lb"

;

1043  string

scheme(

"http"

);

1047  buf

,

sizeof

(

buf

), kEutils);

1048

host =

string

(web && *web ? web : kEutils);

1058  string const

& params,

1063  string

extra_params{ params };

1070  msg

<<

"Failed to execute request: " 1086

istr << extra_params;

1088

ostringstream reply;

1092  string

reply_str = reply.str();

1093

istringstream reply_istr(reply.str());

1094

vector<TEntrezId> uids;

1108  const string

& db_to,

1109  const

vector<int>& uids_from,

1110

vector<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  const

vector<CSeq_id_Handle>& uids_from,

1122

vector<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  const

vector<string>& uids_from,

1132

vector<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  const

vector<TEntrezId>& uids_from,

1142

vector<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  const

vector<int>& uids_from,

1153

vector<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  const

vector<TEntrezId>& uids_from,

1163

vector<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  const

vector<TEntrezId>& uids_from,

1174

vector<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  const

vector<CSeq_id_Handle>& uids_from,

1184

vector<TEntrezId>& uids_to,

1185  const string

& xml_path,

1188  x_Link

(db_from, db_to, uids_from, uids_to, xml_path,

command

);

1191 template

<

class

T1,

class

T2>

1193  const string

& db_to,

1194  const

vector<T1>& uids_from,

1195

vector<T2>& uids_to,

1196  const string

& xml_path,

1199

std::ostringstream oss;

1206  string

params = oss.str();

1214

cref(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  string

path =

"/entrez/eutils/elink.fcgi"

;

1243  if

(!xml_path.empty()) {

1251

parser.

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  const

vector<int>& uids_from,

1287  const string

& db_to,

1288  const

vector<CSeq_id_Handle>& uids_from,

1296  const string

& db_to,

1297  const

vector<string>& uids_from,

1305  const string

& db_to,

1306  const

vector<TEntrezId>& uids_from,

1315  const string

& db_to,

1316  const

vector<T>& uids_from,

1320

std::ostringstream oss;

1327  string

params = oss.str();

1337  "failed to execute elink request: "

+ params);

1344  string

path =

"/entrez/eutils/elink.fcgi"

;

1359  const string

& db_to,

1360  const string

& web_env,

1364

std::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,

1381

std::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,

1399

std::ostringstream oss;

1404

<<

"&WebEnv="

<< web_env

1405

<<

"&query_key="

<< query_key

1408  x_Get

(

"/entrez/eutils/elink.fcgi"

, oss.str(), ostr);

1413  const

vector<int>& uids,

1415  const string

&

cmd

)

1423  const

vector<objects::CSeq_id_Handle>& uids,

1425  const string

&

cmd

)

1431  const

vector<string>& uids,

1433  const string

&

cmd

)

1439  const

vector<TEntrezId>& uids,

1441  const string

&

cmd

)

1447  const

vector<T>& uids,

1449  const string

&

cmd

)

1456  string

params = oss.str();

1466  "failed to execute esummary request: "

+ params);

1473  string

path =

"/entrez/eutils/elink.fcgi?"

;

1475  string

url =

x_BuildUrl

(hostname, path, params);

1480  m_Url

.push_back(url);

1489  string

docstr(sb.str());

1499  const

vector<int>& uids,

1508  const

vector<CSeq_id_Handle>& uids,

1516  const

vector<string>& uids,

1524  const

vector<TEntrezId>& uids,

1533  const

vector<T>& uids,

1545  string

params = oss.str();

1555  "failed to execute esummary request: "

+ params);

1562  string

path =

"/entrez/eutils/esummary.fcgi?"

;

1564  string

url =

x_BuildUrl

(hostname, path, params);

1569  m_Url

.push_back(url);

1578  string

docstr(sb.str());

1582

docsums.

swap

(xmldoc);

1588  const string

& web_env,

1595

<<

"&WebEnv="

<< web_env;

1597  if

( retstart > 0 ) {

1598

oss <<

"&retstart="

<< retstart;

1602

oss <<

"&retmax="

<< retmax;

1612  const string

& web_env,

1620

oss <<

"&query_key="

<< query_key;

1621  x_Get

(

"/entrez/eutils/esummary.fcgi?"

, oss.str(), ostr);

1625  const string

& web_env,

1633

oss <<

"&query_key="

<< query_key

1635  x_Get

(

"/entrez/eutils/esummary.fcgi?"

, oss.str(), ostr);

1639  const string

& web_env,

1640  const string

& query_key,

1647

oss <<

"&query_key="

<< query_key

1649  x_Get

(

"/entrez/eutils/esummary.fcgi?"

, oss.str(), ostr);

1654  const

vector<int>& uids,

1656  const string

& retmode)

1658  x_Fetch

(db, uids, ostr, retmode);

1663  const

vector<CSeq_id_Handle>& uids,

1665  const string

& retmode)

1667  x_Fetch

(db, uids, ostr, retmode);

1671  const

vector<string>& uids,

1673  const string

& retmode)

1675  x_Fetch

(db, uids, ostr, retmode);

1679  const

vector<TEntrezId>& uids,

1681  const string

& retmode)

1683  x_Fetch

(db, uids, ostr, retmode);

1688  const

vector<T>& uids,

1690  const string

& retmode)

1697  string

params = oss.str();

1707  "failed to execute efetch request: "

+ params);

1714  string

path =

"/entrez/eutils/efetch.fcgi"

;

1730  switch

(content_type) {

1748  const string

& web_env,

1755

<<

"&WebEnv="

<< web_env;

1756  if

( retstart > 0 ) {

1757

oss <<

"&retstart="

<< retstart;

1761

oss <<

"&retmax="

<< retmax;

1766  const string

& web_env,

1774

oss <<

"&query_key="

<< query_key;

1776  x_Get

(

"/entrez/eutils/efetch.fcgi"

, oss.str(), ostr);

1780  const string

& web_env,

1783

EContentType content_type,

1788

oss <<

"&query_key="

<< query_key

1791  x_Get

(

"/entrez/eutils/efetch.fcgi"

, oss.str(), ostr);

1795  const string

& web_env,

1796  const string

& query_key,

1803

oss <<

"&query_key="

<< query_key

1806  x_Get

(

"/entrez/eutils/efetch.fcgi"

, oss.str(), ostr);

1820  const string

&params)

1822  string

url = host + path;

1823  if

(!params.empty()) {

1824

url +=

'?'

+ params;

1835

oss <<

'&'

<< param.first <<

'='

<< param.second;

1837

params += 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 &params)

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 &params)

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 &params)

void x_AddAdditionalParameters(string &params)

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 &params)

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 &params, CNcbiOstream &ostr)

Uint8 x_ParseSearchResults(const string &xml_file, vector< T > &uids)

void x_LinkOnce(CNcbiOstream &ostr, const string &params)

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 &params)

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 &params, 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 &params)

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 &params)

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 &section, 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