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

NCBI C++ ToolKit: src/app/cn3d/asn_reader.hpp Source File

34 #ifndef CN3D_ASN_READER__HPP 35 #define CN3D_ASN_READER__HPP 63 template

<

class

ASNClass >

71

*err =

"Cannot open file for reading"

;

75

unique_ptr<ncbi::CObjectIStream> inObject;

78

inObject.reset(

new

ncbi::CObjectIStreamAsnBinary(inStream));

81

inObject.reset(

new

ncbi::CObjectIStreamAsn(inStream));

88

*inObject >> *ASNobject;

89

}

catch

(std::exception& e) {

100 template

<

class

ASNClass >

101 bool WriteASNToFile

(

const char

*filename,

const

ASNClass& ASNobject,

bool

isBinary,

110

*err =

"Cannot open file for writing"

;

114

unique_ptr<ncbi::CObjectOStream> outObject;

117

outObject.reset(

new

ncbi::CObjectOStreamAsnBinary(outStream, fixNonPrint));

120

outObject.reset(

new

ncbi::CObjectOStreamAsn(outStream, fixNonPrint));

127

*outObject << ASNobject;

129

}

catch

(std::exception& e) {

141 template

<

class

ASNClass >

145

ASNClass *asnObject,

std::string

*err,

bool

binaryData =

true

,

unsigned short

port = 80)

152

ncbi::CNcbiRegistry* reg =

new

ncbi::CNcbiRegistry;

159

ncbi::CConn_HttpStream httpStream(host, path, args,

kEmptyStr

, port);

160

unique_ptr<ncbi::CObjectIStream> inObject;

162

inObject.reset(

new

ncbi::CObjectIStreamAsnBinary(httpStream));

164

inObject.reset(

new

ncbi::CObjectIStreamAsn(httpStream));

166

*inObject >> *asnObject;

169

}

catch

(ncbi::CSerialException& se) {

170

*err =

std::string

(

"Data is not in expected format; error: "

) + se.what();

171

}

catch

(std::exception& e) {

172

*err =

std::string

(

"Network connection failed or data is not in expected format; error: "

) + e.what();

181 template

<

class

ASNClass >

185  bool

binaryData =

true

)

203

hostCopy =

"https://"

+ host.substr(7);

205

hostCopy =

"https://"

+ host;

207

url = hostCopy + path +

"?"

+ args;

215  if

(err) *err =

"GetAsnDataViaHTTPS: Empty object pointer provided."

;

226

*inObject >> *asnObject;

230  catch

(exception& e) {

bool GetAsnDataViaHTTP(const std::string &host, const std::string &path, const std::string &args, ASNClass *asnObject, std::string *err, bool binaryData=true, unsigned short port=80)

bool GetAsnDataViaHTTPS(const std::string &host, const std::string &path, const std::string &args, ASNClass *asnObject, std::string *err, bool binaryData=true)

bool WriteASNToFile(const char *filename, const ASNClass &ASNobject, bool isBinary, std::string *err, ncbi::EFixNonPrint fixNonPrint=ncbi::eFNP_Default)

bool ReadASNFromFile(const char *filename, ASNClass *ASNobject, bool isBinary, std::string *err)

This stream exchanges data with an HTTP server located at the URL: http[s]://host[:port]/path[?...

Include a standard set of the NCBI C++ Toolkit most basic headers.

The NCBI C++ standard methods for dealing with std::string.

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

main entry point for tests

void SetDiagTrace(EDiagTrace how, EDiagTrace dflt=eDT_Default)

Set the diagnostic trace settings.

@ eDT_Disable

Ignore messages of severity "eDiag_Trace".

@ eDT_Default

Restores the default tracing context.

EFixNonPrint

How to process non-printing character in the ASN VisibleString.

ESerialDataFormat

Data file format.

@ eSerial_AsnText

ASN.1 text.

@ eSerial_AsnBinary

ASN.1 binary.

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

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

#define END_SCOPE(ns)

End the previously defined scope.

#define BEGIN_SCOPE(ns)

Define a new scope.

IO_PREFIX::ofstream CNcbiOfstream

Portable alias for ofstream.

IO_PREFIX::ifstream CNcbiIfstream

Portable alias for ifstream.

static bool StartsWith(const CTempString str, const CTempString start, ECase use_case=eCase)

Check if a string starts with a specified prefix value.

void CORE_SetREG(REG rg)

Set the registry (no registry if "rg" is passed zero) – to be used by the core internals.

REG REG_cxx2c(IRWRegistry *reg, bool pass_ownership=false)

Convert a C++ Toolkit registry object to a REG registry.

#define REG_CONN_DEBUG_PRINTOUT

REG CORE_GetREG(void)

Get the registry that is to be used by the core internals.

#define REG_CONN_REQ_METHOD

#define DEF_CONN_REG_SECTION

Defines NCBI C++ diagnostic APIs, classes, and macros.

Defines NCBI C++ exception handling.

The NCBI C++/STL use hints.

NCBI C++ stream class wrappers for triggering between "new" and "old" C++ stream libraries.

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


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