libxcks
0.1.0.1
|
A directory of the directory structure for XCKS files. More...
Public Member Functions | |
Directory ()=delete | |
Deleted default constructor. More... | |
Directory (const Directory &)=delete | |
Deleted copy constructor. More... | |
Directory & | operator= (const Directory &)=delete |
Deleted assignment operator. More... | |
Directory (const string &directoryName, XCKSDirStruct::Element *parentElement, XCKSDirStruct::Element *previousElement) | |
Constructor. More... | |
virtual | ~Directory () |
Destructor. More... | |
bool | hasChild () const override final |
Does the element have a child? More... | |
bool | isAFile () const override final |
Does the element is a file? More... | |
Element * | getChild () const override final |
Gets the child of the element. More... | |
void | setChild (Element *newChild) override final |
Sets the child of the element. More... | |
Public Member Functions inherited from libxcks::XCKSDirStruct::Element | |
Element ()=delete | |
Deleted default constructor. More... | |
Element (const Element &)=delete | |
Deleted copy constructor. More... | |
Element & | operator= (const Element &)=delete |
Deleted assignment operator. More... | |
Element (const string &elementName, Element *parentElement, Element *previousElement) | |
Constructor. More... | |
virtual | ~Element () |
Destructor. More... | |
virtual bool | hasPrevious () const final |
Does the element have a previous element? More... | |
virtual bool | hasNext () const final |
Does the element have a following element? More... | |
virtual bool | hasParent () const final |
Does the element have a parent? More... | |
virtual bool | hasElement (const string &elementName) const final |
Does an element exist with the given name in the current level? More... | |
virtual string | getName () const final |
Gets the name of the element. More... | |
virtual Element * | getPrevious () const final |
Gets the previous element of the element. More... | |
virtual void | setPrevious (Element *newPrevious) final |
Sets the previous element of the element. More... | |
virtual Element * | getNext () const final |
Gets the following element of the element. More... | |
virtual void | setNext (Element *newNext) final |
Sets the following element of the element. More... | |
virtual Element * | getParent () const final |
Gets the parent element of the element. More... | |
virtual void | getParent (Element *newParent) final |
Sets the parent element of the element. More... | |
virtual void * | getData () const |
Gets the data associated with the element. More... | |
virtual void | setData (void *newData) |
Sets the data associated with the element. More... | |
virtual Element * | getElement (const string &elementName, Element **lastElement=nullptr) const final |
Gets the element with the given name in the current level. More... | |
bool | addFile (const ArrayString &dirs, const size_t cur, const string &filename, void *data=nullptr) |
Adds a new file in the directory structure. More... | |
XCKSDirStruct::File * | getNextFile () const |
Gets the next file in the directory structure. More... | |
Protected Attributes | |
Element * | child |
Address of the first child if the element if a directory. More... | |
Protected Attributes inherited from libxcks::XCKSDirStruct::Element | |
string | name |
The name of the element. More... | |
Element * | parent |
Address of the parent. More... | |
Element * | previous |
Address of the previous element at the same level. More... | |
Element * | next |
Address of the next element at the same level. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from libxcks::XCKSDirStruct::Element | |
Element * | createDirsAndAddFile (const ArrayString &dirs, const size_t cur, const string &filename, void *data=nullptr) |
Creates directories and adds a new file in the directory structure. More... | |
XCKSDirStruct::File * | getNextFileRec () const |
Gets the next file in the directory structure (recursive). More... | |
XCKSDirStruct::File * | getNextFile (const bool calledFromChild) const |
Gets the next file in the directory structure. More... | |
A directory of the directory structure for XCKS files.
Definition at line 336 of file xcksfilewriter.cpp.
|
delete |
Deleted default constructor.
|
delete |
Deleted copy constructor.
libxcks::XCKSDirStruct::Directory::Directory | ( | const string & | fileName, |
XCKSDirStruct::Element * | parentElement, | ||
XCKSDirStruct::Element * | previousElement | ||
) |
Constructor.
fileName | Name of the file. |
parentElement | Parent of the file. |
previousElement | Address of the previous element (can be nullptr if is the first element of the level). |
Definition at line 887 of file xcksfilewriter.cpp.
|
inlinevirtual |
Destructor.
Definition at line 355 of file xcksfilewriter.cpp.
|
inlinefinaloverridevirtual |
Gets the child of the element.
nullptr
if the element hasn't a child. Reimplemented from libxcks::XCKSDirStruct::Element.
Definition at line 377 of file xcksfilewriter.cpp.
|
inlinefinaloverridevirtual |
Does the element have a child?
true
if the element has a child, false
otherwise. Reimplemented from libxcks::XCKSDirStruct::Element.
Definition at line 362 of file xcksfilewriter.cpp.
|
inlinefinaloverridevirtual |
Does the element is a file?
true
if the element is a file, false
otherwise. Implements libxcks::XCKSDirStruct::Element.
Definition at line 369 of file xcksfilewriter.cpp.
Deleted assignment operator.
|
inlinefinaloverridevirtual |
Sets the child of the element.
newChild | The new child of the element. |
Reimplemented from libxcks::XCKSDirStruct::Element.
Definition at line 384 of file xcksfilewriter.cpp.
|
protected |
Address of the first child if the element if a directory.
Definition at line 339 of file xcksfilewriter.cpp.