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
WsTreeSerializer Class Reference

Serializes a tree (WsAccessTree, WsMenuTree). More...

#include <WsTreeSerializer.h>

Collaboration diagram for WsTreeSerializer:
Collaboration graph

Public Member Functions

 WsTreeSerializer (WsAccessTree *tree)
 Constructor. More...
 
int serialize ()
 serialize the given data structur More...
 
const std::string getSerializedForm ()
 returns the Json text representing the given structure More...
 

Private Member Functions

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

Private Attributes

NodePtr m_rootNode
 
Json::Value m_root
 
Json::Value m_current
 
boost::filesystem::path m_rootPath
 
std::string m_stamp
 

Detailed Description

Serializes a tree (WsAccessTree, WsMenuTree).

Takes the tree as input and outputs a Json tree Use WsTreeDeserializer to deserialize it

Definition at line 32 of file WsTreeSerializer.h.

Constructor & Destructor Documentation

WsTreeSerializer::WsTreeSerializer ( WsAccessTree tree)

Constructor.

Parameters
treethe WsAccessTree to serialize

Definition at line 19 of file WsTreeSerializer.cpp.

Member Function Documentation

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

adds a SubNode to the tree corresponding to the Json entry

Definition at line 38 of file WsTreeSerializer.cpp.

Here is the caller graph for this function:

const string WsTreeSerializer::getSerializedForm ( )

returns the Json text representing the given structure

Definition at line 70 of file WsTreeSerializer.cpp.

Here is the caller graph for this function:

int WsTreeSerializer::serialize ( )

serialize the given data structur

Definition at line 26 of file WsTreeSerializer.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

Json::Value WsTreeSerializer::m_current
private

Definition at line 61 of file WsTreeSerializer.h.

Json::Value WsTreeSerializer::m_root
private

Definition at line 60 of file WsTreeSerializer.h.

NodePtr WsTreeSerializer::m_rootNode
private

Definition at line 59 of file WsTreeSerializer.h.

boost::filesystem::path WsTreeSerializer::m_rootPath
private

Definition at line 62 of file WsTreeSerializer.h.

std::string WsTreeSerializer::m_stamp
private

Definition at line 63 of file WsTreeSerializer.h.


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