NCBI C++ ToolKit
Public Member Functions | Protected Member Functions | Friends | List of all members
CJson_Node Class Reference

Search Toolkit Book for CJson_Node

#include <misc/jsonwrapp/jsonwrapp11.hpp>

+ Inheritance diagram for CJson_Node:
+ Collaboration diagram for CJson_Node:

Public Member Functions

CJson_NodeSetNull (void)
 Erase node data and convert it into JSON NULL value. More...
 
CJson_Value ResetValue (void)
 Erase node data and convert it into JSON value. More...
 
CJson_Value SetValue (void)
 Get JSON value contents of the node. More...
 
CJson_Array ResetArray (void)
 Erase node data and convert it into JSON array. More...
 
CJson_Array SetArray (void)
 Get JSON array contents of the node. More...
 
CJson_Object ResetObject (void)
 Erase node data and convert it into JSON object. More...
 
CJson_Object SetObject (void)
 Get JSON object contents of the node. More...
 
CJson_Node SetNode (const TKeyType &value)
 Get node by JSON pointer If node not found, it will be created. More...
 
 ~CJson_Node (void)
 
 CJson_Node (const CJson_Node &n)
 Note: this does not copy Node data Instead, both Node objects will point to the same data. More...
 
CJson_Nodeoperator= (const CJson_Node &n)
 Note: this does not copy Node data Instead, both Node objects will point to the same data. More...
 
CJson_NodeAssignCopy (const CJson_ConstNode &n)
 Copy Node contents data into this node. More...
 
- Public Member Functions inherited from CJson_ConstNode
EJsonType GetType (void) const
 Get value type. More...
 
bool IsNull (void) const
 
bool IsValue (void) const
 
bool IsArray (void) const
 
bool IsObject (void) const
 
CJson_ConstValue GetValue (void) const
 Get JSON value contents of the node. More...
 
CJson_ConstArray GetArray (void) const
 Get JSON array contents of the node. More...
 
CJson_ConstObject GetObject (void) const
 Get JSON object contents of the node. More...
 
bool HasNode (const TKeyType &value) const
 Check if there is a node for JSON pointer. More...
 
CJson_ConstNode GetNode (const TKeyType &value) const
 Get node by JSON pointer If node not found, method throws std::out_of_range exception. More...
 
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. More...
 
 ~CJson_ConstNode (void)
 
 CJson_ConstNode (const CJson_ConstNode &n)
 Note: this does not copy Node data Instead, both Node objects will point to the same data. More...
 
CJson_ConstNodeoperator= (const CJson_ConstNode &n)
 Note: this does not copy Node data Instead, both Node object will point to the same data. More...
 
bool operator!= (const CJson_ConstNode &n) const
 
bool operator== (const CJson_ConstNode &n) const
 

Protected Member Functions

 CJson_Node (void)
 
 CJson_Node (_Impl *impl)
 
- Protected Member Functions inherited from CJson_ConstNode
 CJson_ConstNode (void)
 
 CJson_ConstNode (_Impl *impl)
 
void x_Assign (const CJson_ConstNode &n)
 

Friends

class CJson_Value
 
class CJson_Array
 
class CJson_ConstArray
 
class CJson_Object
 
class CJson_ConstObject
 
class CJson_Document
 
class CJson_ConstObject_pair
 
class CJson_Object_pair
 

Additional Inherited Members

- Public Types inherited from CJson_ConstNode
enum  EJsonType {
  eNull , eBool , eNumber , eString ,
  eArray , eObject
}
 Value type. More...
 
typedef char TCharType
 
typedef ncbi::CStringUTF8 TStringType
 
typedef ncbi::CStringUTF8 TKeyType
 
- Protected Types inherited from CJson_ConstNode
typedef rapidjson::Value _Impl
 
- Static Protected Member Functions inherited from CJson_ConstNode
static _Impl *& x_Impl (CJson_ConstNode &v)
 
- Protected Attributes inherited from CJson_ConstNode
_Implm_Impl
 

Detailed Description

Definition at line 217 of file jsonwrapp11.hpp.

Constructor & Destructor Documentation

◆ ~CJson_Node()

CJson_Node::~CJson_Node ( void  )
inline

Definition at line 245 of file jsonwrapp11.hpp.

◆ CJson_Node() [1/3]

CJson_Node::CJson_Node ( const CJson_Node n)
inline

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

Definition at line 1236 of file jsonwrapp11.hpp.

◆ CJson_Node() [2/3]

CJson_Node::CJson_Node ( void  )
inlineprotected

Definition at line 257 of file jsonwrapp11.hpp.

Referenced by SetNode().

◆ CJson_Node() [3/3]

CJson_Node::CJson_Node ( _Impl impl)
inlineprotected

Definition at line 259 of file jsonwrapp11.hpp.

References CJson_ConstNode::m_Impl.

Member Function Documentation

◆ AssignCopy()

CJson_Node & CJson_Node::AssignCopy ( const CJson_ConstNode n)
inline

Copy Node contents data into this node.

Definition at line 1244 of file jsonwrapp11.hpp.

References rapidjson::GenericValue< Encoding, Allocator >::GetValueAllocator(), CJson_ConstNode::m_Impl, and n.

Referenced by CJsonResponse::CJsonResponse().

◆ operator=()

CJson_Node & CJson_Node::operator= ( const CJson_Node n)
inline

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

Definition at line 1240 of file jsonwrapp11.hpp.

References n, and CJson_ConstNode::operator=().

Referenced by CJson_Array::operator=(), CJson_Object::operator=(), and CJson_Value::operator=().

◆ ResetArray()

CJson_Array CJson_Node::ResetArray ( void  )
inline

Erase node data and convert it into JSON array.

Definition at line 1309 of file jsonwrapp11.hpp.

References CJson_Array, and CJson_ConstNode::m_Impl.

Referenced by CJsonResponse::Fill(), and CJsonResponse::Set().

◆ ResetObject()

CJson_Object CJson_Node::ResetObject ( void  )
inline

Erase node data and convert it into JSON object.

Definition at line 1321 of file jsonwrapp11.hpp.

References CJson_Object, and CJson_ConstNode::m_Impl.

Referenced by CJsonResponse::CJsonResponse(), and CJsonResponse::Set().

◆ ResetValue()

CJson_Value CJson_Node::ResetValue ( void  )
inline

Erase node data and convert it into JSON value.

Definition at line 1297 of file jsonwrapp11.hpp.

References CJson_Value, and CJson_ConstNode::m_Impl.

◆ SetArray()

CJson_Array CJson_Node::SetArray ( void  )
inline

Get JSON array contents of the node.

Definition at line 1313 of file jsonwrapp11.hpp.

References _ASSERT, CJson_Array, CJson_ConstNode::IsArray(), and CJson_ConstNode::m_Impl.

Referenced by CJson_Object::insert_array(), and CJson_Array::push_back_array().

◆ SetNode()

CJson_Node CJson_Node::SetNode ( const TKeyType value)
inline

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

Definition at line 1288 of file jsonwrapp11.hpp.

References a, CJson_Node(), rapidjson::GenericValue< Encoding, Allocator >::GetValueAllocator(), CJson_ConstNode::m_Impl, and rapidjson::value.

◆ SetNull()

CJson_Node & CJson_Node::SetNull ( void  )
inline

Erase node data and convert it into JSON NULL value.

Definition at line 1293 of file jsonwrapp11.hpp.

References CJson_ConstNode::m_Impl.

Referenced by CJsonResponse::CJsonResponse().

◆ SetObject()

CJson_Object CJson_Node::SetObject ( void  )
inline

◆ SetValue()

CJson_Value CJson_Node::SetValue ( void  )
inline

Get JSON value contents of the node.

Definition at line 1301 of file jsonwrapp11.hpp.

References _ASSERT, CJson_Value, CJson_ConstNode::IsValue(), and CJson_ConstNode::m_Impl.

Referenced by CJsonResponse::CJsonResponse(), and SResponse::Error().

Friends And Related Function Documentation

◆ CJson_Array

friend class CJson_Array ( void  )
friend

Definition at line 263 of file jsonwrapp11.hpp.

Referenced by ResetArray(), and SetArray().

◆ CJson_ConstArray

friend class CJson_ConstArray ( void  )
friend

Definition at line 264 of file jsonwrapp11.hpp.

◆ CJson_ConstObject

friend class CJson_ConstObject ( void  )
friend

Definition at line 266 of file jsonwrapp11.hpp.

◆ CJson_ConstObject_pair

friend class CJson_ConstObject_pair
friend

Definition at line 268 of file jsonwrapp11.hpp.

◆ CJson_Document

friend class CJson_Document
friend

Definition at line 267 of file jsonwrapp11.hpp.

◆ CJson_Object

friend class CJson_Object ( void  )
friend

Definition at line 265 of file jsonwrapp11.hpp.

Referenced by ResetObject(), and SetObject().

◆ CJson_Object_pair

friend class CJson_Object_pair
friend

Definition at line 269 of file jsonwrapp11.hpp.

◆ CJson_Value

friend class CJson_Value ( void  )
friend

Definition at line 262 of file jsonwrapp11.hpp.

Referenced by ResetValue(), and SetValue().


The documentation for this class was generated from the following file:
Modified on Fri May 03 15:52:45 2024 by modify_doxy.py rev. 669887