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

NCBI C++ ToolKit: include/misc/jsonwrapp/jsonwrapp11.hpp Source File

1 #ifndef MISC_JSONWRAPP___JSONWRAPP11__HPP 2 #define MISC_JSONWRAPP___JSONWRAPP11__HPP 74 #define RAPIDJSON_NOMEMBERITERATORCLASS 75 #if defined(_MSC_VER) && !defined(_SILENCE_CXX17_ITERATOR_BASE_CLASS_DEPRECATION_WARNING) 76 #define _SILENCE_CXX17_ITERATOR_BASE_CLASS_DEPRECATION_WARNING 77 #define UNDEFINE_SILENCE_CXX17_ITERATOR_BASE_CLASS_DEPRECATION_WARNING 89 #if defined(UNDEFINE_SILENCE_CXX17_ITERATOR_BASE_CLASS_DEPRECATION_WARNING) 90 #undef _SILENCE_CXX17_ITERATOR_BASE_CLASS_DEPRECATION_WARNING 91 #undef UNDEFINE_SILENCE_CXX17_ITERATOR_BASE_CLASS_DEPRECATION_WARNING 146  bool IsNull

(

void

)

const

;

178  unsigned int

indent_char_count = 4)

const

;

283  bool IsBool

(

void

)

const

;

285  bool IsInt4

(

void

)

const

;

287  bool IsInt8

(

void

)

const

;

456  size_t size

(

void

)

const

;

463  bool empty

(

void

)

const

;

551 #ifndef NCBI_COMPILER_WORKSHOP 552  template

<

typename

T>

void push_back

(

const T

&);

553  template

<

typename

T>

void push_back

(

const T

*);

748  size_t size

(

void

)

const

;

751  bool empty

(

void

)

const

;

827 #ifdef NCBI_COMPILER_WORKSHOP 1000  bool Uint

(

unsigned

v);

1058  bool Read

(std::istream&

in

);

1066

std::ifstream

in

(filename.c_str());

1075

std::ifstream

in

(filename.c_str());

1095  unsigned int

indent_char_count = 4)

const

;

1099  unsigned int

indent_char_count = 4)

const

{

1100

std::ofstream

out

(filename.c_str());

1107  unsigned int

indent_char_count = 4)

const

;

1112  unsigned int

indent_char_count = 4)

const

{

1113

std::ofstream

out

(filename.c_str());

1150

std::ifstream

in

(filename.c_str());

1185  if

(!d.

Read

(is)) {

1186

is.setstate(std::ios::failbit);

1210 #define JSONWRAPP_TO_NCBIUTF8(v) (v) 1213 #define JSONWRAPP_MAKENODE(v) (v) 1219

: m_Impl(

n

.m_Impl) {

1223  m_Impl

=

n

.m_Impl;

return

*

this

;

1228  return m_Impl

->operator==(*

n

.m_Impl);

1233  return m_Impl

->operator!=(*

n

.m_Impl);

1252  switch

(

m_Impl

->GetType()) {

1266  return m_Impl

->IsNull();

1272  return m_Impl

->IsArray();

1275  return m_Impl

->IsObject();

1283  throw

std::out_of_range(

"node not found"

);

1294  m_Impl

->SetNull( );

return

*

this

;

1347  return std::string

( ncbi::CNcbiOstrstreamToString(os) );

1370  return m_Impl

->IsBool();

1373  return m_Impl

->IsNumber();

1379  return m_Impl

->IsUint();

1382  return m_Impl

->IsInt64();

1385  return m_Impl

->IsUint64();

1388  return m_Impl

->IsDouble();

1391  return m_Impl

->IsString();

1395  return m_Impl

->GetBool();

1398  return m_Impl

->GetInt();

1401  return m_Impl

->GetUint();

1404  return m_Impl

->GetInt64();

1407  return m_Impl

->GetUint64();

1410  return m_Impl

->GetDouble();

1417  return m_Impl

->GetStringLength();

1476  return m_Impl

->Capacity();

1482  if

(index >=

size

()) {

1483  throw

std::out_of_range(

"array index out of range"

);

1488  if

(index >=

size

()) {

1489  throw

std::out_of_range(

"array index out of range"

);

1513 #ifndef NCBI_COMPILER_WORKSHOP 1523 #define JSW_EMPTY_TEMPLATE template<> 1525 #define JSW_EMPTY_TEMPLATE 1573

push_back<CJson_ConstNode>(v);

1576

push_back<CJson_ConstNode>(v);

1579

push_back<CJson_ConstNode>(v);

1582

push_back<CJson_ConstNode>(v);

1585

push_back<CJson_ConstNode>(v);

1587 #undef JSW_EMPTY_TEMPLATE 1632

m_vi = vi.

m_vi

;

return

*

this

;

1637  return

m_vi != vi.

m_vi

;

1642  return

m_vi == vi.

m_vi

;

1647  return

m_vi < vi.

m_vi

;

1652  return

m_vi <= vi.

m_vi

;

1657  return

m_vi > vi.

m_vi

;

1662  return

m_vi >= vi.

m_vi

;

1666

++m_vi;

return

*

this

;

1674

m_vi +=

i

;

return

*

this

;

1682

--m_vi;

return

*

this

;

1690

m_vi -=

i

;

return

*

this

;

1698  x_Impl

(m_v) = m_vi;

return

m_v;

1702  x_Impl

(m_v) = m_vi;

return

&m_v;

1706  return

m_vi - vi.

m_vi

;

1740

++m_vi;

return

*

this

;

1748

--m_vi;

return

*

this

;

1756  x_Impl

(m_v) = m_vi;

return

m_v;

1760  x_Impl

(m_v) = m_vi;

return

&m_v;

1764  return

m_vi - vi.

m_vi

;

1789  m_Impl

->RemoveAllMembers();

1792  return m_Impl

->RemoveMember(name.c_str()) ? 1 : 0;

1802  return m_Impl

->MemberCount();

1805  return m_Impl

->ObjectEmpty();

1810  throw

std::out_of_range(name +

" object member not found"

);

1817  throw

std::out_of_range(name +

" object member not found"

);

1850 template

<>

inline void 1856 template

<>

inline void 1862 template

<>

inline void 1868 template

<>

inline void 1874 template

<>

inline void 1880 #if NCBI_INT8_IS_LONG 1881 template

<>

inline void 1885 template

<>

inline void 1887  const unsigned long long

& v) {

1890 #elif SIZEOF_LONG == 8 1891 template

<>

inline void 1895 template

<>

inline void 1901 template

<>

inline void 1907 template

<>

inline void 1913 template

<>

inline void 1919  m_Impl

->AddMember( sv_name, sv_value,

a

);

1921 #ifndef NCBI_COMPILER_WORKSHOP 1929 template

<>

inline void 1935 template

<>

inline void 1937

insert<CJson_ConstNode>(name, v);

1939 template

<>

inline void 1941

insert<CJson_ConstNode>(name, v);

1943 template

<>

inline void 1945

insert<CJson_ConstNode>(name, v);

1947 template

<>

inline void 1949

insert<CJson_ConstNode>(name, v);

1951 template

<>

inline void 1953

insert<CJson_ConstNode>(name, v);

1971  return m_Impl

->HasMember(name.c_str());

2020

++m_vi;

return

*

this

;

2028

--m_vi;

return

*

this

;

2037

m_vi = vi.

m_vi

;

return

*

this

;

2042

m_vi = vi.

m_vi

;

return

*

this

;

2047  return

m_vi != vi.

m_vi

;

2052  return

m_vi == vi.

m_vi

;

2057  return

m_vi != vi.

m_vi

;

2062  return

m_vi == vi.

m_vi

;

2089  return

&(m_pvi.assign(m_vi->name.GetString(), m_vi->value));

2111

m_vi = vi.

m_vi

;

return

*

this

;

2116  return

m_vi != vi.

m_vi

;

2121  return

m_vi == vi.

m_vi

;

2126  return

m_vi != vi.

m_vi

;

2131  return

m_vi == vi.

m_vi

;

2135

++m_vi;

return

*

this

;

2143

--m_vi;

return

*

this

;

2151  return

m_pvi.

assign

(m_vi->name.GetString(), m_vi->value);

2155  return

&(m_pvi.assign(m_vi->name.GetString(), m_vi->value));

2294

std::vector<bool>::const_iterator te =

m_object_type

.end();

2295

std::vector<size_t>::const_iterator

i

=

m_index

.begin();

2296

std::vector<CJson_Node::TKeyType>::const_iterator

n

=

m_name

.begin();

2298  for

( ++

t

, ++

i

, ++

n

;

t

!= te; ++

t

, ++

i

, ++

n

) {

2299  if

(*

t

&& !

n

->empty()) {

2302

}

else if

(*

i

!=

size_t

(-1)) {

2308  return

path.empty() ?

"/"

: path;

2313

std::vector<bool>::const_iterator te =

m_object_type

.end();

2314

std::vector<size_t>::const_iterator

i

=

m_index

.begin();

2315

std::vector<CJson_Node::TKeyType>::const_iterator

n

=

m_name

.begin();

2317  for

( ++

t

, ++

i

, ++

n

;

t

!= te; ++

t

, ++

i

, ++

n

) {

2318  if

(*

t

&& !

n

->empty()) {

2321

}

else if

(*

i

!=

size_t

(-1)) {

2326  return

path.empty() ?

"/"

: path;

2410  schema

.m_SchemaValidator.SetValidationError(rdr);

2418

FILE *

fp

= fopen(filename.c_str(),

"rt"

);

2420

std::unique_ptr<char[]>

buf

(

new char

[s]);

2468  bool

res =

m_DocImpl

.Accept(validator);

2469  schema

.m_SchemaValidator.SetValidationError(validator);

2496  "id": "http://json-schema.org/draft-04/schema#", 2497  "$schema": "http://json-schema.org/draft-04/schema#", 2498  "description": "Core schema meta-schema", 2503  "items": { "$ref": "#" } 2505  "positiveInteger": { 2509  "positiveIntegerDefault0": { 2510  "allOf": [ { "$ref": "#/definitions/positiveInteger" }, { "default": 0 } ] 2513  "enum": [ "array", "boolean", "integer", "null", "number", "object", "string" ] 2517  "items": { "type": "string" }, 2540  "exclusiveMinimum": true 2545  "exclusiveMaximum": { 2552  "exclusiveMinimum": { 2556  "maxLength": { "$ref": "#/definitions/positiveInteger" }, 2557  "minLength": { "$ref": "#/definitions/positiveIntegerDefault0" }, 2562  "additionalItems": { 2564  { "type": "boolean" }, 2572  { "$ref": "#/definitions/schemaArray" } 2576  "maxItems": { "$ref": "#/definitions/positiveInteger" }, 2577  "minItems": { "$ref": "#/definitions/positiveIntegerDefault0" }, 2582  "maxProperties": { "$ref": "#/definitions/positiveInteger" }, 2583  "minProperties": { "$ref": "#/definitions/positiveIntegerDefault0" }, 2584  "required": { "$ref": "#/definitions/stringArray" }, 2585  "additionalProperties": { 2587  { "type": "boolean" }, 2594  "additionalProperties": { "$ref": "#" }, 2599  "additionalProperties": { "$ref": "#" }, 2602  "patternProperties": { 2604  "additionalProperties": { "$ref": "#" }, 2609  "additionalProperties": { 2612  { "$ref": "#/definitions/stringArray" } 2623  { "$ref": "#/definitions/simpleTypes" }, 2626  "items": { "$ref": "#/definitions/simpleTypes" }, 2632  "format": { "type": "string" }, 2633  "allOf": { "$ref": "#/definitions/schemaArray" }, 2634  "anyOf": { "$ref": "#/definitions/schemaArray" }, 2635  "oneOf": { "$ref": "#/definitions/schemaArray" }, 2636  "not": { "$ref": "#" } 2639  "exclusiveMaximum": [ "maximum" ], 2640  "exclusiveMinimum": [ "minimum" ] 2651

: m_SchemaDocument(

schema

.m_DocImpl),

2652

m_SchemaValidator( m_SchemaDocument)

2691  "\', see schema at \'"

+ sb2.

GetString

() +

iterator erase(const_iterator _where)

Remove an element.

void push_back(void)

Add null element to the end of the array.

void reserve(size_t count)

Reserve a minimum length of storage for the array object.

CJson_Node front(void)

Return a reference to the first element in the array If the array is empty, the result is undefined.

CJson_ConstArray::iterator iterator

void clear(void)

Erase all elements of the array.

CJson_Object push_back_object(void)

Add object type element to the end of the array.

iterator end(void) const

Return a random-access iterator that points just beyond the end of the array.

CJson_Node operator[](size_t index)

Return a reference to the element at a specified location in the array If index is greater than or eq...

CJson_Array push_back_array(void)

Add array type element to the end of the array.

iterator begin(void) const

Return a random-access iterator to the first element in the array.

void pop_back(void)

Delete the element at the end of the array.

CJson_ConstArray::const_iterator const_iterator

CJson_Node back(void)

Return a reference to the last element of the array.

CJson_Array & operator=(const CJson_Array &n)

Note: this does not copy Node data Instead, both Node objects will point to the same data.

CJson_Node at(size_t index)

Return a reference to the element at a specified location in the array If index is greater than or eq...

Random-access iterator to access const JSON array element.

const CJson_ConstNode & operator*(void) const

Dereference.

std::ptrdiff_t distance_type

const CJson_ConstNode * operator->(void) const

const_iterator & operator+=(int)

const_iterator & operator--(void)

const_iterator & operator-=(int)

std::ptrdiff_t difference_type

CJson_ConstNode & reference

bool operator!=(const const_iterator &vi) const

Comparison.

const_iterator & operator=(const const_iterator &vi)

bool operator>=(const const_iterator &vi) const

bool operator>(const const_iterator &vi) const

CJson_ConstNode * pointer

CJson_ConstNode value_type

bool operator<(const const_iterator &vi) const

bool operator<=(const const_iterator &vi) const

const_iterator operator+(int) const

std::random_access_iterator_tag iterator_category

const_iterator operator-(int) const

const_iterator(const _ImplIterator vi)

bool operator==(const const_iterator &vi) const

const_iterator & operator++(void)

Increment and decrement.

Random-access iterator to access non-const JSON array element.

iterator & operator++(void)

Increment and decrement.

iterator & operator=(const iterator &vi)

CJson_Node & operator*(void) const

Dereference.

std::ptrdiff_t distance_type

iterator & operator--(void)

iterator operator+(int) const

std::ptrdiff_t difference_type

CJson_Node * operator->(void) const

iterator operator-(int) const

std::random_access_iterator_tag iterator_category

CJson_ConstNode front(void) const

Return a reference to the first element in the array If the array is empty, the result is undefined.

CJson_ConstNode at(size_t index) const

Return a reference to the element at a specified location in the array If index is greater than or eq...

CJson_ConstArray(_Impl *impl)

rapidjson::Value::ValueIterator _ImplIterator

CJson_ConstNode operator[](size_t index) const

Return a reference to the element at a specified location in the array If index is greater than or eq...

size_t size(void) const

Return the number of elements in the array.

const_iterator begin(void) const

Return a random-access iterator to the first element in the array.

rapidjson::Value::ConstValueIterator _ImplCIterator

CJson_ConstNode & const_reference

size_t capacity(void) const

Return the number of elements that the array could contain without allocating more storage.

bool empty(void) const

Test if the array is empty.

CJson_ConstNode back(void) const

Return a reference to the last element of the array.

CJson_ConstArray & operator=(const CJson_ConstArray &n)

Note: this does not copy Node data Instead, both Node objects will point to the same data.

const_iterator end(void) const

Return a random-access iterator that points just beyond the end of the array.

friend class CJson_ConstNode

CJson_ConstNode value_type

bool IsObject(void) const

CJson_ConstObject GetObject(void) const

Get JSON object contents of the node.

ncbi::CStringUTF8 TStringType

CJson_ConstArray GetArray(void) const

Get JSON array contents of the node.

friend class CJson_ConstArray

std::string ToString(TJson_Write_Flags flags=fJson_Write_IndentWithSpace, unsigned int indent_char_count=4) const

Convert the contents of the node into string.

void x_Assign(const CJson_ConstNode &n)

friend class CJson_ConstValue

bool operator!=(const CJson_ConstNode &n) const

CJson_ConstNode(_Impl *impl)

CJson_ConstValue GetValue(void) const

Get JSON value contents of the node.

bool HasNode(const TKeyType &value) const

Check if there is a node for JSON pointer.

CJson_ConstNode & operator=(const CJson_ConstNode &n)

Note: this does not copy Node data Instead, both Node object will point to the same data.

static _Impl *& x_Impl(CJson_ConstNode &v)

CJson_ConstNode GetNode(const TKeyType &value) const

Get node by JSON pointer If node not found, method throws std::out_of_range exception.

friend class CJson_ConstObject

ncbi::CStringUTF8 TKeyType

EJsonType GetType(void) const

Get value type.

bool operator==(const CJson_ConstNode &n) const

Bidirectional iterator to access const JSON object element.

const_iterator & operator--(void)

bool operator!=(const const_iterator &vi) const

Comparison.

std::ptrdiff_t difference_type

bool operator==(const const_iterator &vi) const

CJson_ConstObject::const_iterator::pair value_type

CJson_ConstObject_pair pair

std::bidirectional_iterator_tag iterator_category

const pair & operator*(void) const

Dereference.

const_iterator & operator=(const const_iterator &vi)

const pair * operator->(void) const

const_iterator & operator++(void)

Increment and decrement.

CJson_ConstObject::const_iterator::pair & reference

CJson_ConstObject::const_iterator::pair * pointer

std::ptrdiff_t distance_type

Bidirectional iterator to access non-const JSON object element.

std::bidirectional_iterator_tag iterator_category

std::ptrdiff_t distance_type

CJson_ConstObject::iterator::pair & reference

iterator & operator++(void)

Increment and decrement.

CJson_ConstObject::iterator::pair * pointer

iterator & operator--(void)

iterator & operator=(const iterator &vi)

std::ptrdiff_t difference_type

CJson_ConstObject::iterator::pair value_type

pair * operator->(void) const

bool operator==(const iterator &vi) const

pair & operator*(void) const

Dereference.

bool operator!=(const iterator &vi) const

Comparison.

const CJson_Node::TCharType * name

CJson_ConstObject_pair & assign(const CJson_Node::TCharType *_name, const _Impl &_value)

const CJson_ConstNode value

CJson_ConstObject_pair(void)

~CJson_ConstObject_pair(void)

bool empty(void) const

Test if the object is empty.

const_iterator find(const CJson_Node::TKeyType &name) const

Return an iterator that points to the location of the element.

const_iterator begin(void) const

Return an iterator that points to the first element in the object.

CJson_ConstNode operator[](const CJson_Node::TKeyType &name) const

Access an element with a given name.

rapidjson::Value::MemberIterator _ImplIterator

CJson_ConstNode at(const CJson_Node::TKeyType &name) const

Access an element with a given name.

CJson_ConstObject & operator=(const CJson_ConstObject &v)

Note: this does not copy Node data Instead, both Node objects will point to the same data.

size_t size(void) const

Return the number of elements in the object.

const_iterator end(void) const

Return an iterator that points to the location after the last element.

CJson_ConstObject_pair value_type

CJson_ConstObject(_Impl *impl)

bool has(const CJson_Node::TKeyType &name) const

Test if an element with this name exists in the object.

rapidjson::Value::ConstMemberIterator _ImplCIterator

friend class CJson_ConstNode

Uint4 GetUint4(void) const

Uint8 GetUint8(void) const

bool GetBool(void) const

Get primitive value data.

bool IsString(void) const

CJson_ConstValue & operator=(const CJson_ConstValue &n)

Note: this does not copy Node data Instead, both Node objects will point to the same data.

bool IsBool(void) const

Test if value type is compatible with C++ type.

TStringType GetString(void) const

double GetDouble(void) const

size_t GetStringLength(void) const

bool IsDouble(void) const

bool IsNumber(void) const

CJson_ConstValue(_Impl *impl)

bool ReadBuffered(const std::string &filename)

Read JSON data from a file using character buffer This appears to be faster than ifstream.

bool Write(const std::string &filename, TJson_Write_Flags flags=fJson_Write_IndentWithSpace, unsigned int indent_char_count=4) const

Write JSON data into a file.

bool Read(std::istream &in)

Read JSON data from a stream.

std::string GetReadError(void) const

Get most recent read error.

bool ParseString(const TStringType &v)

Read JSON data from a UTF8 string.

bool Walk(CJson_WalkHandler &walk) const

Traverse the document contents returns TRUE if all the contents was processed.

bool ParseMutableString(TCharType *v)

Read JSON data from a mutable char buffer NOTE: as a result, the buffer may change.

rapidjson::Document _DocImpl

bool ReadSucceeded(void) const

Test if the most recent read was successful.

CJson_Document & operator=(const CJson_Document &v)

Copy another document contents into this document.

bool EndOfData(void) const

Most recent read produced empty document.

bool Read(const std::string &filename)

Read JSON data from a file.

bool Write(std::ostream &out, TJson_Write_Flags flags=fJson_Write_IndentWithSpace, unsigned int indent_char_count=4) const

Write JSON data into a stream.

bool Read(const std::string &filename, CJson_Schema &schema)

Read JSON data from a file, validating against schema.

bool Write(const std::string &filename, CJson_Schema &schema, TJson_Write_Flags flags=fJson_Write_IndentWithSpace, unsigned int indent_char_count=4) const

Write JSON data into a file, validating against schema.

bool IsSchema(void) const

Check that the JSON document is a valid JSON schema.

friend class CJson_Object

CJson_Object ResetObject(void)

Erase node data and convert it into JSON object.

CJson_Node SetNode(const TKeyType &value)

Get node by JSON pointer If node not found, it will be created.

CJson_Node & operator=(const CJson_Node &n)

Note: this does not copy Node data Instead, both Node objects will point to the same data.

CJson_Array SetArray(void)

Get JSON array contents of the node.

CJson_Array ResetArray(void)

Erase node data and convert it into JSON array.

CJson_Node & AssignCopy(const CJson_ConstNode &n)

Copy Node contents data into this node.

CJson_Value ResetValue(void)

Erase node data and convert it into JSON value.

friend class CJson_Document

CJson_Object SetObject(void)

Get JSON object contents of the node.

CJson_Node & SetNull(void)

Erase node data and convert it into JSON NULL value.

CJson_Value SetValue(void)

Get JSON value contents of the node.

CJson_Object value type - [name,value] pair.

const CJson_Node::TCharType * name

CJson_Object_pair & assign(const CJson_Node::TCharType *_name, _Impl &_value)

size_t erase(const CJson_Node::TKeyType &name)

Remove an element with a given name from the object Returns the number of elements that have been rem...

CJson_ConstObject::const_iterator const_iterator

CJson_Array insert_array(const CJson_Node::TKeyType &name)

Insert array type element into the object.

void insert(const CJson_Node::TKeyType &name)

Insert null element into the object.

CJson_Object(_Impl *impl)

void clear(void)

Erase all elements of the object.

CJson_Object insert_object(const CJson_Node::TKeyType &name)

Insert object type element into the object.

CJson_Node at(const CJson_Node::TKeyType &name)

Access an element with a given name.

iterator begin(void) const

Return an iterator that points to the first element in the object.

CJson_Object & operator=(const CJson_Object &v)

Note: this does not copy Node data Instead, both Node objects will point to the same data.

CJson_ConstObject::iterator iterator

CJson_Object_pair value_type

iterator end(void) const

Return an iterator that points to the location after the last element.

iterator find(const CJson_Node::TKeyType &name) const

Return an iterator that points to the location of the element.

CJson_Node operator[](const CJson_Node::TKeyType &name)

Access an element with a given name.

CJson_Schema(const CJson_Document &schema)

Construct JSON schema from JSON document.

bool Validate(const CJson_Document &v)

Validate JSON document against schema.

std::string GetInvalidValueProperty(void) const

Return name of the property which does not conform to schema.

std::string GetInvalidValueDocumentUri(void) const

Return nonconforming value URI in the document.

std::string GetValidationError() const

Return validation error.

bool Validate(std::istream &in)

Validate JSON data from a stream.

rapidjson::SchemaDocument m_SchemaDocument

rapidjson::SchemaValidator m_SchemaValidator

bool IsValid(void) const

Return result of the most recent validation.

std::string GetInvalidValueSchemaUri(void) const

Return nonconforming value URI in schema.

bool Validate(const std::string &filename)

Validate JSON data from a file.

CJson_Value & SetUint4(Uint4 value)

CJson_Value & SetString(const TStringType &value)

CJson_Value & SetDouble(double value)

CJson_Value & SetInt8(Int8 value)

CJson_Value & SetBool(bool value)

Set primitive value data.

CJson_Value & operator=(const CJson_Value &n)

Note: this does not copy Node data Instead, both Node objects will point to the same data.

CJson_Value & SetInt4(Int4 value)

CJson_Value & SetUint8(Uint8 value)

std::vector< size_t > m_index

virtual bool EndObject(const CJson_Node::TKeyType &)

End reading object contents.

bool Key(const Ch *buf, rapidjson::SizeType sz, bool c)

bool String(const Ch *buf, rapidjson::SizeType sz, bool c)

std::vector< bool > m_object_type

bool Read(CJson_Document &doc)

Convert data, starting at the current parsing position, into a document object.

virtual bool PlainElementValue(const CJson_Node::TKeyType &, size_t, const CJson_ConstValue &)

Primitive type data has been read.

bool x_BeginObjectOrArray(bool object_type)

virtual bool EndArray(const CJson_Node::TKeyType &)

End reading array contents.

virtual bool BeginArray(const CJson_Node::TKeyType &)

Begin reading array contents.

virtual bool BeginArrayElement(const CJson_Node::TKeyType &, size_t)

Begin reading array element.

std::vector< CJson_Node::TKeyType > m_name

virtual ~CJson_WalkHandler(void)

CJson_Node::TKeyType GetCurrentJPath(void) const

Return current stack path as string For example: "/root/obj2/arr[3]".

virtual bool BeginObjectMember(const CJson_Node::TKeyType &, const CJson_Node::TKeyType &)

Begin reading object member.

virtual bool PlainMemberValue(const CJson_Node::TKeyType &, const CJson_Node::TKeyType &, const CJson_ConstValue &)

Primitive type data has been read.

virtual bool BeginObject(const CJson_Node::TKeyType &)

Begin reading object contents.

void x_EndObjectOrArray(void)

bool x_Notify(const rapidjson::Value &v)

void x_SetSource(std::istream *in)

CJson_Node::TKeyType GetCurrentJPointer(void) const

Return current stack path as JSON pointer For example: "/root/obj2/arr/3".

static unsigned long GetVirtualMemoryAllocationGranularity(void)

Return size of an allocation unit (usually it is a multiple of page size).

Concept for allocating, resizing and freeing memory block.

Wrapper of std::basic_istream into RapidJSON's Stream concept.

Wrapper of std::basic_istream into RapidJSON's Stream concept.

Wrapper of std::basic_ostream into RapidJSON's Stream concept.

File byte stream for input using fread().

A document for parsing JSON text as DOM.

Allocator & GetAllocator() const

Get the allocator of this document.

GenericDocument & ParseStream(InputStream &is)

Parse JSON text from an input stream (with Encoding conversion)

GenericDocument & Populate(Generator &g)

Populate this document by a generator which produces SAX events.

bool HasParseError() const

Whether a parse error has occured in the last parsing.

GenericDocument & ParseInsitu(Ch *str)

Parse JSON text from a mutable string.

ParseErrorCode GetParseError() const

Get the ParseErrorCode of last parsing.

void SetParseResult(const ParseResult &result)

GenericDocument & Parse(const typename SourceEncoding::Ch *str)

Parse JSON text from a read-only string (with Encoding conversion)

Represents a JSON Pointer. Use Pointer for UTF8 encoding and default allocator.

SAX-style JSON parser. Use Reader for UTF8 encoding and default allocator.

ParseResult Parse(InputStream &is, Handler &handler)

Parse JSON text.

const Ch * GetInvalidSchemaKeyword() const

Gets the keyword of invalid schema.

PointerType GetInvalidSchemaPointer() const

Gets the JSON pointer pointed to the invalid schema.

PointerType GetInvalidDocumentPointer() const

Gets the JSON pointer pointed to the invalid value.

virtual bool IsValid() const

Checks whether the current state is valid.

void Reset()

Reset the internal states.

Represents an in-memory output stream.

const Ch * GetString() const

Represents a JSON value. Use Value for UTF8 encoding and default allocator.

Allocator * GetValueAllocator(void) const

GenericMemberIterator< true, Encoding, Allocator >::Iterator ConstMemberIterator

Constant member iterator for iterating in object.

GenericMemberIterator< false, Encoding, Allocator >::Iterator MemberIterator

Member iterator for iterating in object.

Writer with indentation and spacing.

PrettyWriter & SetWriteEol(bool eol)

PrettyWriter & SetIndent(Ch indentChar, unsigned indentCharCount)

Set custom indentation.

A helper class for parsing with validation.

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

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

main entry point for tests

static const char * schema

int32_t Int4

4-byte (32-bit) signed integer

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

const char * GetParseError_En(ParseErrorCode parseErrorCode)

Maps error code of parsing into error message.

@ kParseErrorDocumentEmpty

The document is empty.

#define END_NCBI_SCOPE

End previously defined NCBI scope.

#define BEGIN_NCBI_SCOPE

Define ncbi namespace.

CNcbistrstream_Base< IO_PREFIX::ostrstream, IOS_BASE::out > CNcbiOstrstream

const char *const kEmptyCStr

Empty "C" string (points to a '\0').

#define JSONWRAPP_TO_NCBIUTF8(v)

std::ostream & operator<<(std::ostream &os, const CJson_Document &d)

Insertion operator for JSON document.

#define JSONWRAPP_MAKENODE(v)

std::istream & operator>>(std::istream &is, CJson_Document &d)

Extraction operator for JSON document.

unsigned int TJson_Write_Flags

#define JSW_EMPTY_TEMPLATE

@ fJson_Write_NoIndentation

do not use indentation

@ fJson_Write_IndentWithSpace

use space (' ') symbol for indentation

@ fJson_Write_IndentWithTab

use tab ('\t') symbol for indentation

@ fJson_Write_NoEol

do not write end-of-line symbol

GenericPointer< Value, CrtAllocator > Pointer

GenericPointer for Value (UTF-8, default allocator).

const GenericPointer< typename T::ValueType > T2 value

unsigned SizeType

Size type (for string lengths, array sizes, etc.)

BasicIStreamWrapper< std::istream > IStreamWrapper

GenericSchemaDocument< Value, CrtAllocator > SchemaDocument

GenericSchemaDocument using Value type.

@ kParseStopWhenDoneFlag

After parsing a complete JSON root from stream, stop further processing the rest of stream....

BasicIStreamAsyncWrapper< std::istream > IStreamAsyncWrapper

NCBI C++ auxiliary debug macros.

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

common definitions and configuration

Default implementation of Handler.


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