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/pubmed__fetch_8cpp_source.html below:

NCBI C++ ToolKit: src/objtools/edit/pubmed_fetch/pubmed_fetch.cpp Source File

56

arg_desc->SetUsageContext(

""

,

"Retrieve publications data from PubMed and display in ASN"

);

61

arg_desc->AddOptionalKey(

"url"

,

"url"

,

"eutils base URL (http://eutils.ncbi.nlm.nih.gov/entrez/eutils/ by default)"

,

CArgDescriptions::eString

);

64

arg_desc->AddFlag(

"stats"

,

"Only print execution statistics"

);

72

vector<TEntrezId> pmids;

75  TIntId id

= args[

"id"

].AsIntId();

79

cerr <<

"Warning: Invalid ID: "

<<

id

<< endl;

81

}

else if

(args[

"ids"

]) {

84  for

(

string

id_str : ids) {

89

cerr <<

"Warning: Invalid ID: "

<< id_str << endl;

92

}

else if

(args[

"idfile"

]) {

97  if

(id_str.empty() || id_str.front() ==

'#'

) {

104

cerr <<

"Warning: Invalid ID: "

<< id_str << endl;

108

cerr <<

"Error: One of -id, -ids, or -idfile must be specified."

<< endl;

113

cerr <<

"Warning: No PMIDs specified"

<< endl;

119

ostream*

output

=

nullptr

;

121  output

= &args[

"o"

].AsOutputFile();

129  string

url = args[

"url"

].AsString();

130

upd->SetBaseURL(url);

133  bool

bstats = args[

"stats"

];

143  CRef<CPub>

pub(upd->GetPubmedEntry(pmid, &err));

150

cerr <<

"Error: "

<< err << endl;

153

cerr <<

"CException: "

<< e.

what

() << endl;

159

*

output

<<

" * Number of runs: "

<< nruns << endl;

160

*

output

<<

" * successful: "

<< ngood << endl;

161

*

output

<<

" * Elapsed time: "

<<

sw

<< endl;

165

args[

"o"

].CloseFile();

172 int main

(

int

argc,

const char

* argv[])

int Run() override

Run the application.

void Init() override

Initialize the application.

CPubmedFetchApplication()

static SQLCHAR output[256]

SStrictId_Entrez::TId TEntrezId

TEntrezId type for entrez ids which require the same strictness as TGi.

virtual const CArgs & GetArgs(void) const

Get parsed command line arguments.

int AppMain(int argc, const char *const *argv, const char *const *envp=0, EAppDiagStream diag=eDS_Default, const char *conf=NcbiEmptyCStr, const string &name=NcbiEmptyString)

Main function (entry point) for the NCBI application.

virtual void SetupArgDescriptions(CArgDescriptions *arg_desc)

Setup the command line argument descriptions.

#define ENTREZ_ID_FROM(T, value)

void SetVersion(const CVersionInfo &version)

Set the version number for the program.

@ fHidden

Hide it in Usage.

@ eInputFile

Name of file (must exist and be readable)

@ eIntId

Convertible to TIntId (int or Int8 depending on NCBI_INT8_GI)

@ eString

An arbitrary string.

@ eOutputFile

Name of file (must be writable)

virtual const char * what(void) const noexcept

Standard report (includes full backlog).

#define MSerial_AsnText

I/O stream manipulators –.

CNcbiIstream & NcbiGetlineEOL(CNcbiIstream &is, string &str, string::size_type *count=NULL)

Read from "is" to "str" the next line (taking into account platform specifics of End-of-Line)

IO_PREFIX::istream CNcbiIstream

Portable alias for istream.

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 TNumeric StringToNumeric(const CTempString str, TStringToNumFlags flags=0, int base=10)

Convert string to a numeric value.

static void TruncateSpacesInPlace(string &str, ETrunc where=eTrunc_Both)

Truncate whitespace in a string (in-place)

@ fConvErr_NoThrow

Do not throw an exception on error.

void Stop(void)

Suspend the timer.

void Start(void)

Start the timer.

#define NCBI_SC_VERSION_PROXY

#define NCBI_TEAMCITY_BUILD_NUMBER_PROXY

Defines the CNcbiApplication and CAppException classes for creating NCBI applications.

int main(int argc, const char *argv[])


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