%{ #include "Model/DDirectory.h" using namespace ccdb; %} class DDirectory : public DStoredObject { public: DDirectory(); ///Default constructor virtual ~DDirectory(); ///Destructor /** * @brief Get * @return pointer to parent directory. NULL if there is no parent directory */ DDirectory* GetParentDirectory(); /** * @brief Gets the vector of pointers to subdirectories * @return vector of pointers to subdirectories */ const vector& GetSubdirectories(); /** * @brief Adds a subdirectory of this directory * * Adds a subdirectory of this directory * Automatically adds "this" as mParent for child * * @param subDirectory Child directory to be added */ void AddSubdirectory(DDirectory *subdirectory); /** * @brief deletes all subdirectories recursively */ void DisposeSubdirectories(); dbkey_t GetId() const; ///DB id void SetId(dbkey_t val); ///DB id dbkey_t GetParentId() const; ///DB id of parent directory. Id=0 - root directory void SetParentId(dbkey_t val); ///DB id of parent directory. Id=0 - root directory std::string GetName() const; ///Name of the directory void SetName(std::string val); ///Name of the directory std::string GetFullPath() const; ///Full path (including self name) of the directory void SetFullPath(std::string val); ///Full path (including self name) of the directory time_t GetCreatedTime() const; ///Creation time void SetCreatedTime(time_t val); ///Creation time time_t GetModifiedTime() const; ///Last modification time void SetModifiedTime(time_t val);///Last modification time std::string GetComment() const; ///Full description of the directory void SetComment(std::string val); ///Full description of the directory protected: /** * @brief Sets parent directory of this directory * * Sets parent directory of this directory. * The function should not be used unless from @link AddSubdirecrory method * So one uses only AddSubdirecrory to generate directories structure * @param parent Parent directory. Might be NULL if No parent is present */ void SetParent(DDirectory *parent); };