libxcks
0.1.0.1
|
An file of the directory structure for XCKS files. More...
Public Member Functions | |
File ()=delete | |
Deleted default constructor. More... | |
File (const File &)=delete | |
Deleted copy constructor. More... | |
File & | operator= (const File &)=delete |
Deleted assignment operator. More... | |
File (const string &elementName, XCKSDirStruct::Element *parentElement, XCKSDirStruct::Element *previousElement, void *elementData=nullptr) | |
Constructor. More... | |
virtual | ~File () |
Destructor. More... | |
bool | isAFile () const override final |
Does the element is a file? More... | |
void * | getData () const override |
Gets the data associated with the element. More... | |
void | setData (void *newData) override final |
Sets the data associated with 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 | hasChild () const |
Does the element have a child? 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 * | getChild () const |
Gets the child of the element. More... | |
virtual void | setChild (Element *newChild) |
Sets the child 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 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 | |
void * | data |
Data associated with the element. 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... | |
An file of the directory structure for XCKS files.
Definition at line 287 of file xcksfilewriter.cpp.
|
delete |
Deleted default constructor.
|
delete |
Deleted copy constructor.
libxcks::XCKSDirStruct::File::File | ( | const string & | fileName, |
XCKSDirStruct::Element * | parentElement, | ||
XCKSDirStruct::Element * | previousElement, | ||
void * | elementData = nullptr |
||
) |
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). |
elementData | The data associated to the file element. |
Definition at line 862 of file xcksfilewriter.cpp.
|
inlinevirtual |
Destructor.
Definition at line 307 of file xcksfilewriter.cpp.
|
inlineoverridevirtual |
Gets the data associated with the element.
Reimplemented from libxcks::XCKSDirStruct::Element.
Definition at line 321 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 314 of file xcksfilewriter.cpp.
|
inlinefinaloverridevirtual |
Sets the data associated with the element.
newData | The data associated with the element. |
Reimplemented from libxcks::XCKSDirStruct::Element.
Definition at line 328 of file xcksfilewriter.cpp.
|
protected |
Data associated with the element.
Definition at line 290 of file xcksfilewriter.cpp.