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

NCBI C++ ToolKit: src/sample/app/objects/objects_sample.cpp Source File

55  virtual void Init

(

void

);

56  virtual int Run

(

void

);

69

arg_desc->SetUsageContext

71  "Object serialization demo program: Seq-entry translator"

);

74

arg_desc->AddDefaultKey

75

(

"in"

,

"InputFile"

,

76  "name of file to read from (standard input by default)"

,

78

arg_desc->AddDefaultKey(

"infmt"

,

"InputFormat"

,

"format of input file"

,

80

arg_desc->SetConstraint

83

arg_desc->AddDefaultKey

84

(

"out"

,

"OutputFile"

,

85  "name of file to write to (standard output by default)"

,

87

arg_desc->AddDefaultKey(

"outfmt"

,

"OutputFormat"

,

"format of output file"

,

89

arg_desc->SetConstraint

101

}

else if

(name ==

"asnb"

) {

103

}

else if

(name ==

"xml"

) {

107  THROW1_TRACE

(runtime_error,

"Bad serial format name "

+ name);

119

unique_ptr<CObjectIStream>

in 121

args[

"in"

].AsInputFile()));

127  auto

ids = seq->GetId();

128  for

(

const auto

&

id

: ids) {

129  if

(&

id

!= &ids.front()) {

132  id

->WriteAsFasta(cerr);

139

unique_ptr<CObjectOStream>

out 141

args[

"out"

].AsOutputFile()));

virtual int Run(void)

Run the application.

virtual void Init(void)

Initialize the application.

Template class for iteration on objects of class C (non-medifiable version)

std::ofstream out("events_result.xml")

main entry point for tests

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.

const CNcbiArguments & GetArguments(void) const

Get the application's cached unprocessed command-line arguments.

@ fPreOpen

Open file right away; for eInputFile, eOutputFile, eIOFile.

@ eInputFile

Name of file (must exist and be readable)

@ eString

An arbitrary string.

@ eOutputFile

Name of file (must be writable)

#define THROW1_TRACE(exception_class, exception_arg)

Throw trace.

ESerialDataFormat

Data file format.

@ eSerial_AsnText

ASN.1 text.

@ eSerial_AsnBinary

ASN.1 binary.

CConstBeginInfo ConstBegin(const C &obj)

Get starting point of non-modifiable object hierarchy.

static CObjectOStream * Open(ESerialDataFormat format, CNcbiOstream &outStream, bool deleteOutStream)

Create serial object writer and attach it to an output stream.

static CObjectIStream * Open(ESerialDataFormat format, CNcbiIstream &inStream, bool deleteInStream)

Create serial object reader and attach it to an input stream.

Magic spell ;-) needed for some weird compilers... very empiric.

Defines the CNcbiApplication and CAppException classes for creating NCBI applications.

Defines command line argument related classes.

Defines unified interface to application:

std::istream & in(std::istream &in_, double &x_)

int NcbiSys_main(int argc, ncbi::TXChar *argv[])

static ESerialDataFormat s_GetFormat(const string &name)


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