HCE project C++ developers source code library  1.1.1
HCE project developer library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
HCE::utils::JsonObjExtractor Class Reference

#include <JsonObjExtractor.hpp>

Public Member Functions

 JsonObjExtractor ()
Poco::Dynamic::Var getAsVar (Poco::JSON::Object::Ptr obj, std::vector< Poco::Dynamic::Var > &varPath)
Poco::JSON::Object::Ptr getAsObject (Poco::JSON::Object::Ptr obj, std::vector< Poco::Dynamic::Var > &varPath)
Poco::JSON::Array::Ptr getAsArray (Poco::JSON::Object::Ptr obj, std::vector< Poco::Dynamic::Var > &varPath)
bool isVar (Poco::JSON::Object::Ptr obj, std::vector< Poco::Dynamic::Var > &varPath)
bool isObject (Poco::JSON::Object::Ptr obj, std::vector< Poco::Dynamic::Var > &varPath)
bool isArray (Poco::JSON::Object::Ptr obj, std::vector< Poco::Dynamic::Var > &varPath)
bool isKeyPresent (Poco::JSON::Object::Ptr obj, std::vector< Poco::Dynamic::Var > &varPath)
void generateMap (Poco::JSON::Object::Ptr obj, std::string &name)
 ~JsonObjExtractor ()

Static Public Member Functions

static std::string toJsonPath (std::vector< Poco::Dynamic::Var > &varPath) throw (JsonObjectExeption)

Static Public Attributes

static char objSeparator = '.'
static char arraySeparatorBegin = '['
static char arraySeparatorEnd = ']'

Protected Member Functions

void commonParsePrepareObj (Poco::JSON::Object::Ptr obj, std::vector< Poco::Dynamic::Var > &varPath)
void commonParseObj (Poco::JSON::Object::Ptr obj, std::vector< Poco::Dynamic::Var > &varPath) throw (JsonObjectExeption)
void mapExtract (std::vector< Poco::Dynamic::Var > &varPath)
void commonParseSelectType (Poco::JSON::Object::Ptr obj, std::vector< Poco::Dynamic::Var > &varPath)
void generateMapByObj (Poco::JSON::Object::Ptr obj, std::string &name)
void generateMapByArray (Poco::JSON::Array::Ptr array, std::string &name)
void clearLocalFields ()

Protected Attributes

Poco::JSON::Object::Ptr localObj
Poco::JSON::Array::Ptr localArray
Poco::Dynamic::Var localVar
std::string errString
std::map< unsigned int,
Poco::Dynamic::Var > 
globalMap

Detailed Description

Definition at line 37 of file JsonObjExtractor.hpp.

Constructor & Destructor Documentation

HCE::utils::JsonObjExtractor::JsonObjExtractor ( )

Definition at line 32 of file JsonObjExtractor.cpp.

HCE::utils::JsonObjExtractor::~JsonObjExtractor ( )

Definition at line 275 of file JsonObjExtractor.cpp.

Member Function Documentation

void HCE::utils::JsonObjExtractor::clearLocalFields ( )
protected

Definition at line 245 of file JsonObjExtractor.cpp.

void HCE::utils::JsonObjExtractor::commonParseObj ( Poco::JSON::Object::Ptr  obj,
std::vector< Poco::Dynamic::Var > &  varPath 
) throw (JsonObjectExeption)
protected

Definition at line 34 of file JsonObjExtractor.cpp.

void HCE::utils::JsonObjExtractor::commonParsePrepareObj ( Poco::JSON::Object::Ptr  obj,
std::vector< Poco::Dynamic::Var > &  varPath 
)
inlineprotected

Definition at line 74 of file JsonObjExtractor.hpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void HCE::utils::JsonObjExtractor::commonParseSelectType ( Poco::JSON::Object::Ptr  obj,
std::vector< Poco::Dynamic::Var > &  varPath 
)
inlineprotected

Definition at line 116 of file JsonObjExtractor.hpp.

void HCE::utils::JsonObjExtractor::generateMap ( Poco::JSON::Object::Ptr  obj,
std::string &  name 
)

Definition at line 159 of file JsonObjExtractor.cpp.

Here is the call graph for this function:

void HCE::utils::JsonObjExtractor::generateMapByArray ( Poco::JSON::Array::Ptr  array,
std::string &  name 
)
protected

Definition at line 205 of file JsonObjExtractor.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void HCE::utils::JsonObjExtractor::generateMapByObj ( Poco::JSON::Object::Ptr  obj,
std::string &  name 
)
protected

Definition at line 165 of file JsonObjExtractor.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Poco::JSON::Array::Ptr HCE::utils::JsonObjExtractor::getAsArray ( Poco::JSON::Object::Ptr  obj,
std::vector< Poco::Dynamic::Var > &  varPath 
)
inline

Definition at line 140 of file JsonObjExtractor.hpp.

Poco::JSON::Object::Ptr HCE::utils::JsonObjExtractor::getAsObject ( Poco::JSON::Object::Ptr  obj,
std::vector< Poco::Dynamic::Var > &  varPath 
)
inline

Definition at line 134 of file JsonObjExtractor.hpp.

Poco::Dynamic::Var HCE::utils::JsonObjExtractor::getAsVar ( Poco::JSON::Object::Ptr  obj,
std::vector< Poco::Dynamic::Var > &  varPath 
)
inline

Definition at line 128 of file JsonObjExtractor.hpp.

bool HCE::utils::JsonObjExtractor::isArray ( Poco::JSON::Object::Ptr  obj,
std::vector< Poco::Dynamic::Var > &  varPath 
)
inline

Definition at line 158 of file JsonObjExtractor.hpp.

bool HCE::utils::JsonObjExtractor::isKeyPresent ( Poco::JSON::Object::Ptr  obj,
std::vector< Poco::Dynamic::Var > &  varPath 
)

Definition at line 252 of file JsonObjExtractor.cpp.

Here is the call graph for this function:

bool HCE::utils::JsonObjExtractor::isObject ( Poco::JSON::Object::Ptr  obj,
std::vector< Poco::Dynamic::Var > &  varPath 
)
inline

Definition at line 152 of file JsonObjExtractor.hpp.

bool HCE::utils::JsonObjExtractor::isVar ( Poco::JSON::Object::Ptr  obj,
std::vector< Poco::Dynamic::Var > &  varPath 
)
inline

Definition at line 146 of file JsonObjExtractor.hpp.

void HCE::utils::JsonObjExtractor::mapExtract ( std::vector< Poco::Dynamic::Var > &  varPath)
inlineprotected

Definition at line 91 of file JsonObjExtractor.hpp.

std::string HCE::utils::JsonObjExtractor::toJsonPath ( std::vector< Poco::Dynamic::Var > &  varPath) throw (JsonObjectExeption)
static

Definition at line 118 of file JsonObjExtractor.cpp.

Here is the caller graph for this function:

Member Data Documentation

char HCE::utils::JsonObjExtractor::arraySeparatorBegin = '['
static

Definition at line 67 of file JsonObjExtractor.hpp.

char HCE::utils::JsonObjExtractor::arraySeparatorEnd = ']'
static

Definition at line 68 of file JsonObjExtractor.hpp.

std::string HCE::utils::JsonObjExtractor::errString
protected

Definition at line 43 of file JsonObjExtractor.hpp.

std::map<unsigned int, Poco::Dynamic::Var> HCE::utils::JsonObjExtractor::globalMap
protected

Definition at line 44 of file JsonObjExtractor.hpp.

Poco::JSON::Array::Ptr HCE::utils::JsonObjExtractor::localArray
protected

Definition at line 41 of file JsonObjExtractor.hpp.

Poco::JSON::Object::Ptr HCE::utils::JsonObjExtractor::localObj
protected

Definition at line 40 of file JsonObjExtractor.hpp.

Poco::Dynamic::Var HCE::utils::JsonObjExtractor::localVar
protected

Definition at line 42 of file JsonObjExtractor.hpp.

char HCE::utils::JsonObjExtractor::objSeparator = '.'
static

Definition at line 66 of file JsonObjExtractor.hpp.


The documentation for this class was generated from the following files: