33#include <Pt/Json/Api.h>
34#include <Pt/Json/JsonError.h>
93T* nodeCast(Node* node)
97 if( node->type() == T::nodeId() )
98 e =
static_cast<T*
>(node);
105const T* nodeCast(
const Node* node)
109 if( node->type() == T::nodeId() )
110 e =
static_cast<const T*
>(node);
117T& nodeCast(
Node& node)
119 if( node.type() != T::nodeId() )
122 return static_cast<T&
>(node);
127const T& nodeCast(
const Node& node)
129 if( node.type() != T::nodeId() )
132 return static_cast<const T&
>(node);
JsonError(const std::string &what)
Construct with message.
JSON document node.
Definition Node.h:52
Node(Type type)
Constructs a new Node object with the specified node type.
Definition Node.h:83
virtual ~Node()
Destructor.
Definition Node.h:72
Type type() const
Returns the type of the node.
Definition Node.h:77
Read and write JSON ducuments.
Core module.
Definition Allocator.h:33