Wittyshare  0.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
WsTreeSerializer.h
Go to the documentation of this file.
1 
13 #ifndef WS_MENU_TREE_SERAILIZER_H__
14 #define WS_MENU_TREE_SERAILIZER_H__
15 
17 
18 #include <iostream>
19 
20 #include <json/json.h>
21 #include <json/reader.h>
22 #include <json/value.h>
23 
24 #include <Tree/WsAccessTree.h>
25 
33 
34 public:
35 
41 
45  int serialize();
46 
50  const std::string getSerializedForm();
51 
52 private:
53 
57  int addSub(Json::Value& v, NodePtr n);
58 
62  boost::filesystem::path m_rootPath;
63  std::string m_stamp;
64 
65 };
66 
67 #endif
Reprensents the menu tree of a group. If a group does not have access to a Node, this Node will not s...
boost::shared_ptr< WsAbstractNode > NodePtr
Reprensents an access tree.
Definition: WsAccessTree.h:24
Json::Value m_root
Serializes a tree (WsAccessTree, WsMenuTree).
WsTreeSerializer(WsAccessTree *tree)
Constructor.
Traverses the fileSystemTree.
int addSub(Json::Value &v, NodePtr n)
adds a SubNode to the tree corresponding to the Json entry
Json::Value m_current
int serialize()
serialize the given data structur
std::string m_stamp
const std::string Value
Definition: WsRequestType.h:39
const std::string getSerializedForm()
returns the Json text representing the given structure
boost::filesystem::path m_rootPath