Abstract class representing an WsAccessTree or WsMenuTree.
More...
#include <WsAbstractTree.h>
|
| | WsAbstractTree (FileSystemTreePtr fs, const std::set< std::string > &gid, const int &md, const path &rootPath, const std::string &stamp) |
| | Constructor for the Tree class. More...
|
| |
| | WsAbstractTree (FileSystemTreePtr fs, const std::set< std::string > &gid, const int &md, const std::set< std::string > &names, const std::set< std::string > &ext, const path &rootPath, const std::string &stamp) |
| | Constructor for the Tree class. More...
|
| |
| | WsAbstractTree (NodePtr n, const std::set< std::string > &gid, const int &md, const path &rootPath, const std::string &stamp) |
| | Constructor for the Tree class. More...
|
| |
| | WsAbstractTree (NodePtr n, const std::set< std::string > &gid, const int &md, const std::set< std::string > &names, const std::set< std::string > &ext, const path &rootPath, const std::string &stamp) |
| | Constructor for the Tree class. More...
|
| |
| | ~WsAbstractTree () |
| | Destructor. More...
|
| |
| virtual int | beginTraverseDir (NodePtr n) |
| | Called when a directory is being traversed. More...
|
| |
| virtual int | endTraverseDir (NodePtr n) |
| | Called when a directory has been completely traversed. ie all subnodes(recursively all sub nodes of subnodes etc..) have been traversed. More...
|
| |
| virtual int | traverseFile (NodePtr n) |
| | Called when traversing a fileNode. More...
|
| |
Abstract class representing an WsAccessTree or WsMenuTree.
This class should be derived and is used as parent for WsAccessTree and WsMenuTree
Definition at line 27 of file WsAbstractTree.h.
| WsAbstractTree::WsAbstractTree |
( |
FileSystemTreePtr |
fs, |
|
|
const std::set< std::string > & |
gid, |
|
|
const int & |
md, |
|
|
const path & |
rootPath, |
|
|
const std::string & |
stamp |
|
) |
| |
|
protected |
Constructor for the Tree class.
- Parameters
-
| fs | the fileSystemTree to use |
| gid | a std::set of group names/ids of the user |
| md | max depth default is no max depth (0) |
| rootPath | the root path |
| stamp | the unique stamp of the tree |
| WsAbstractTree::WsAbstractTree |
( |
FileSystemTreePtr |
fs, |
|
|
const std::set< std::string > & |
gid, |
|
|
const int & |
md, |
|
|
const std::set< std::string > & |
names, |
|
|
const std::set< std::string > & |
ext, |
|
|
const path & |
rootPath, |
|
|
const std::string & |
stamp |
|
) |
| |
|
protected |
Constructor for the Tree class.
- Parameters
-
| fs | the fileSystemTree to use |
| gid | a std::set of group names/ids of the user |
| names | the excluded names |
| ext | the excluded extensions |
| rootPath | the root path |
| stamp | the unique stamp of the tree |
| WsAbstractTree::WsAbstractTree |
( |
NodePtr |
n, |
|
|
const std::set< std::string > & |
gid, |
|
|
const int & |
md, |
|
|
const path & |
rootPath, |
|
|
const std::string & |
stamp |
|
) |
| |
|
protected |
Constructor for the Tree class.
- Parameters
-
| n | the Root node of the tree |
| gid | a std::set of group names/ids of the user |
| md | max depth default is no max depth (0) |
| rootPath | the root path |
| stamp | the unique stamp of the tree |
| WsAbstractTree::WsAbstractTree |
( |
NodePtr |
n, |
|
|
const std::set< std::string > & |
gid, |
|
|
const int & |
md, |
|
|
const std::set< std::string > & |
names, |
|
|
const std::set< std::string > & |
ext, |
|
|
const path & |
rootPath, |
|
|
const std::string & |
stamp |
|
) |
| |
|
protected |
Constructor for the Tree class.
- Parameters
-
| n | the root node |
| gid | a std::set of group names/ids of the user |
| names | the excluded names |
| ext | the excluded extensions |
| rootPath | the root path |
| stamp | the unique stamp of the tree |
| WsAbstractTree::~WsAbstractTree |
( |
| ) |
|
|
protected |
| int WsAbstractTree::beginTraverseDir |
( |
NodePtr |
n | ) |
|
|
protectedvirtual |
Called when a directory is being traversed.
- Parameters
-
| n | the NodePtr representing the directory being traversed |
- Returns
- SUCCESS or FAILURE if an error occured
Implements WsTreeTraversal.
Definition at line 76 of file WsAbstractTree.cpp.
| int WsAbstractTree::build |
( |
| ) |
|
|
virtual |
Parses the fileSystemTree and builds the Tree containing only the nodes where the user has access.
- Returns
- SUCCESS if the tree was built without errors, FAILURE otherwise
Definition at line 66 of file WsAbstractTree.cpp.
| int WsAbstractTree::endTraverseDir |
( |
NodePtr |
n | ) |
|
|
protectedvirtual |
Called when a directory has been completely traversed. ie all subnodes(recursively all sub nodes of subnodes etc..) have been traversed.
- Parameters
-
| n | The NodePtr representing the directory that has been completely traversed |
- Returns
- SUCCESS or FAILURE
Implements WsTreeTraversal.
Definition at line 121 of file WsAbstractTree.cpp.
| NodePtr WsAbstractTree::getRoot |
( |
| ) |
|
|
virtual |
Returns the root node of the menuTree.
- Returns
- Pointer to the root of the menuTree
Definition at line 71 of file WsAbstractTree.cpp.
| path & WsAbstractTree::getRootPath |
( |
| ) |
|
|
virtual |
get the root path
- Returns
- boost::filesystem::path representing the rootPath
Definition at line 157 of file WsAbstractTree.cpp.
| const string & WsAbstractTree::getStamp |
( |
| ) |
|
|
virtual |
Get the stamp of the tree.
- Returns
- A std::string containing the stamp
Definition at line 162 of file WsAbstractTree.cpp.
| int WsTreeTraversal::start |
( |
| ) |
|
|
inherited |
| int WsAbstractTree::traverseFile |
( |
NodePtr |
n | ) |
|
|
protectedvirtual |
Called when traversing a fileNode.
- Parameters
-
| n | A NodePtr representing the file being traversed |
- Returns
- SUCCESS or FAILURE
Implements WsTreeTraversal.
Definition at line 129 of file WsAbstractTree.cpp.
| int WsAbstractTree::m_currentDepth |
|
protected |
The current depth of the tree (ie number of levels)
Definition at line 129 of file WsAbstractTree.h.
| std::set<std::string> WsAbstractTree::m_exclExt |
|
protected |
| std::set<std::string> WsAbstractTree::m_exclNames |
|
protected |
| std::set<std::string> WsAbstractTree::m_gid |
|
protected |
| int WsAbstractTree::m_maxDepth |
|
protected |
The max depth of the tree (ie depth we don't want to exceed.
Definition at line 135 of file WsAbstractTree.h.
| path WsAbstractTree::m_rootPath |
|
protected |
| std::string WsAbstractTree::m_stamp |
|
protected |
The documentation for this class was generated from the following files:
- /Users/benoitdaccache/Documents/Dropbox/Programming/Ws/wscore/src/Tree/WsAbstractTree.h
- /Users/benoitdaccache/Documents/Dropbox/Programming/Ws/wscore/src/Tree/WsAbstractTree.cpp