14 #ifndef WS_ABSTRACT_NODE_H__
15 #define WS_ABSTRACT_NODE_H__
16 #define BOOST_FILESYSTEM_NO_DEPRECATED
20 #include <boost/filesystem.hpp>
21 #include <boost/shared_ptr.hpp>
22 #include <boost/enable_shared_from_this.hpp>
23 using namespace boost::filesystem;
40 typedef boost::shared_ptr<WsAbstractNode>
NodePtr;
41 typedef boost::weak_ptr<WsAbstractNode>
WNodePtr;
51 class WsAbstractNode :
public boost::enable_shared_from_this<WsAbstractNode> {
69 virtual const path& getPath() = 0;
74 virtual const path& getFullPath() = 0;
80 virtual string getName(
const bool noExt =
false) = 0;
86 virtual const string getDisplayName(
const bool noExt =
false) = 0;
94 virtual int addChildDirectory(
NodePtr f) = 0;
101 virtual int addChildFile(
NodePtr f) = 0;
107 virtual int addChildNode(
NodePtr f) = 0;
113 virtual void setParent(
NodePtr n) = 0;
119 virtual NodePtr getParent() = 0;
125 virtual const vector<NodePtr> getFiles() = 0;
131 virtual const vector<NodePtr> getDirectories() = 0;
137 virtual const vector<NodePtr> getAll() = 0;
144 virtual NodePtr getNodeByName(
const std::string& name) = 0;
149 virtual bool getDisplayInMenu() = 0;
174 virtual std::string getProperty(
const std::string& section,
const std::string&
id,
const std::string& def,
bool recurse =
false) = 0;
179 virtual void sort() = 0;
189 virtual bool isAllowed(
const std::set<string>& gids) = 0;
194 virtual bool isDirectory() = 0;
199 virtual bool isRegularFile() = 0;
204 virtual const time_t& getModifyDate() = 0;
209 virtual const time_t& getCreateDate() = 0;
215 virtual void setCreateDate(
const time_t& t) = 0;
221 virtual void setModifyDate(
const time_t& t) = 0;
226 virtual void setSize(
const uintmax_t& size) = 0;
232 virtual const uintmax_t getSize() = 0;
240 virtual NodePtr eatPath(
const std::string& path) = 0;
boost::shared_ptr< WsAbstractNode > NodePtr
boost::weak_ptr< WsAbstractNode > WNodePtr
Contains Abstract metods on nodes and variables.
vector< NodePtr > m_combinedVect
vector< NodePtr > m_fileVect
boost::shared_ptr< WsNodeProperties > NodePropertiesPtr
vector< NodePtr > m_dirVect