Go to the documentation of this file.Go to the SVN repository for this file.
87 " label str \"number\",\n"
88 " data int 123456789\n"
100 " label str \"number\",\n"
101 " data int -123456789\n"
107 obj->
AddField(
"double", 123456789.);
109 "User-object ::= {\n"
113 " label str \"double\",\n"
114 " data real { 123456789, 10, 0 }\n"
120 obj->
AddField(
"double", -123456789.);
122 "User-object ::= {\n"
126 " label str \"double\",\n"
127 " data real { -123456789, 10, 0 }\n"
135 "User-object ::= {\n"
139 " label str \"Int8\",\n"
140 " data int 123456789\n"
148 "User-object ::= {\n"
152 " label str \"Int8\",\n"
153 " data int -123456789\n"
168 "User-object ::= {\n"
172 " label str \"number\",\n"
173 " data str \"12345678901235\"\n"
181 "User-object ::= {\n"
185 " label str \"number\",\n"
186 " data str \"-12345678901235\"\n"
192 obj->
AddField(
"double", 12345678901235.);
194 "User-object ::= {\n"
198 " label str \"double\",\n"
199 " data real { 12345678901235, 10, 0 }\n"
205 obj->
AddField(
"double", -12345678901235.);
207 "User-object ::= {\n"
211 " label str \"double\",\n"
212 " data real { -12345678901235, 10, 0 }\n"
220 "User-object ::= {\n"
224 " label str \"Int8\",\n"
225 " data str \"12345678901235\"\n"
233 "User-object ::= {\n"
237 " label str \"Int8\",\n"
238 " data str \"-12345678901235\"\n"
253 "User-object ::= {\n"
257 " label str \"number\",\n"
258 " data str \"123456789012345679\"\n"
266 "User-object ::= {\n"
270 " label str \"number\",\n"
271 " data str \"-123456789012345679\"\n"
277 obj->
AddField(
"double", 123456789012345679.);
279 "User-object ::= {\n"
283 " label str \"double\",\n"
284 " data real { 123456789012346, 10, 3 }\n"
290 obj->
AddField(
"double", -123456789012345679.);
292 "User-object ::= {\n"
296 " label str \"double\",\n"
297 " data real { -123456789012346, 10, 3 }\n"
305 "User-object ::= {\n"
309 " label str \"Int8\",\n"
310 " data str \"123456789012345679\"\n"
318 "User-object ::= {\n"
322 " label str \"Int8\",\n"
323 " data str \"-123456789012345679\"\n"
338 "User-object ::= {\n"
342 " label str \"GI\",\n"
343 " data int 123456789\n"
351 "User-object ::= {\n"
355 " label str \"GI\",\n"
356 " data int -123456789\n"
367 obj->SetType().SetId(1);
370 obj->AddField(
"GI",
GI_CONST(12345678901235));
372 "User-object ::= {\n"
376 " label str \"GI\",\n"
377 " data str \"12345678901235\"\n"
383 obj->AddField(
"GI",
GI_CONST(-12345678901235));
385 "User-object ::= {\n"
389 " label str \"GI\",\n"
390 " data str \"-12345678901235\"\n"
400 obj->SetType().SetId(1);
403 obj->AddField(
"GI",
GI_CONST(123456789012345679));
405 "User-object ::= {\n"
409 " label str \"GI\",\n"
410 " data str \"123456789012345679\"\n"
416 obj->AddField(
"GI",
GI_CONST(-123456789012345679));
418 "User-object ::= {\n"
422 " label str \"GI\",\n"
423 " data str \"-123456789012345679\"\n"
CNcbiOstrstreamToString class helps convert CNcbiOstrstream to a string Sample usage:
Base class for all serializable objects.
CUser_object & AddField(const string &label, const string &value, EParseField parse=eParse_String)
add a data field to the user object that holds a given value
@ eParse_Number
Parse a real or integer number, otherwise string.
std::ofstream out("events_result.xml")
main entry point for tests
static const char * str(char *buf, int n)
#define MSerial_AsnText
I/O stream manipulators –.
ESerialDataFormat
Data file format.
@ eSerial_AsnText
ASN.1 text.
@ eSerial_AsnBinary
ASN.1 binary.
int64_t Int8
8-byte (64-bit) signed integer
void SetType(TType &value)
Assign a value to Type data member.
void ResetData(void)
Reset Data data member.
Defines the CNcbiApplication and CAppException classes for creating NCBI applications.
Utility stuff for more convenient using of Boost.Test library.
BOOST_AUTO_TEST_CASE(s_TestInt8_1)
void TestAllFormats(const CUser_object &obj, const char *asn_text)
static string ToASNString(const CSerialObject &obj)