Wittyshare  0.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Public Member Functions | Private Member Functions | Private Attributes | List of all members
WsTreeDeserializer Class Reference

Deserializes a tree serialized with WsTreeSerializer. More...

#include <WsTreeDeserializer.h>

Collaboration diagram for WsTreeDeserializer:
Collaboration graph

Public Member Functions

 WsTreeDeserializer (const std::string &contents)
 Constructor. More...
 
int deserialize ()
 deserialize the Json input More...
 
NodePtr getMenuRoot ()
 returns the menu root More...
 
const std::string & getStamp ()
 Get the Stamp of the serialized tree. More...
 

Private Member Functions

int parse ()
 parse the Json tree More...
 
int addSub (const Json::Value &v, NodePtr n)
 adds a SubNode to the tree corresponding to the Json entry More...
 

Private Attributes

NodePtr m_rootNode
 Root Node. More...
 
Json::Value m_root
 root of Json Tree More...
 
Json::Reader m_reader
 Json reader. More...
 
std::string m_stamp
 stamp of the tree More...
 
std::string m_contents
 Serialized data that will be deserialized. More...
 
boost::filesystem::path m_rootPath
 The root path. More...
 

Detailed Description

Deserializes a tree serialized with WsTreeSerializer.

See Also
WsTreeSerializer

Definition at line 28 of file WsTreeDeserializer.h.

Constructor & Destructor Documentation

WsTreeDeserializer::WsTreeDeserializer ( const std::string &  contents)

Constructor.

Parameters
contentsthe tree Json input to deserialize

Definition at line 17 of file WsTreeDeserializer.cpp.

Member Function Documentation

int WsTreeDeserializer::addSub ( const Json::Value &  v,
NodePtr  n 
)
private

adds a SubNode to the tree corresponding to the Json entry

Definition at line 36 of file WsTreeDeserializer.cpp.

Here is the caller graph for this function:

int WsTreeDeserializer::deserialize ( )

deserialize the Json input

Returns
SUCCESS if no problem occured and Json input is Valid FAILURE otherwise

Definition at line 21 of file WsTreeDeserializer.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

NodePtr WsTreeDeserializer::getMenuRoot ( )

returns the menu root

Definition at line 84 of file WsTreeDeserializer.cpp.

Here is the caller graph for this function:

const string & WsTreeDeserializer::getStamp ( )

Get the Stamp of the serialized tree.

Returns
a string containing the stamp

Definition at line 69 of file WsTreeDeserializer.cpp.

Here is the caller graph for this function:

int WsTreeDeserializer::parse ( )
private

parse the Json tree

Definition at line 75 of file WsTreeDeserializer.cpp.

Here is the caller graph for this function:

Member Data Documentation

std::string WsTreeDeserializer::m_contents
private

Serialized data that will be deserialized.

Definition at line 89 of file WsTreeDeserializer.h.

Json::Reader WsTreeDeserializer::m_reader
private

Json reader.

Definition at line 79 of file WsTreeDeserializer.h.

Json::Value WsTreeDeserializer::m_root
private

root of Json Tree

Definition at line 74 of file WsTreeDeserializer.h.

NodePtr WsTreeDeserializer::m_rootNode
private

Root Node.

Definition at line 69 of file WsTreeDeserializer.h.

boost::filesystem::path WsTreeDeserializer::m_rootPath
private

The root path.

Definition at line 95 of file WsTreeDeserializer.h.

std::string WsTreeDeserializer::m_stamp
private

stamp of the tree

Definition at line 84 of file WsTreeDeserializer.h.


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