libxcks  0.1.0.1
libxcks::XCKSDirStruct::File Class Referencefinal

An file of the directory structure for XCKS files. More...

Inheritance diagram for libxcks::XCKSDirStruct::File:
Collaboration diagram for libxcks::XCKSDirStruct::File:

Public Member Functions

 File ()=delete
 Deleted default constructor. More...
 
 File (const File &)=delete
 Deleted copy constructor. More...
 
Fileoperator= (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...
 
Elementoperator= (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 ElementgetChild () const
 Gets the child of the element. More...
 
virtual void setChild (Element *newChild)
 Sets the child of the element. More...
 
virtual ElementgetPrevious () 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 ElementgetNext () 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 ElementgetParent () 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 ElementgetElement (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::FilegetNextFile () 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...
 
Elementparent
 Address of the parent. More...
 
Elementprevious
 Address of the previous element at the same level. More...
 
Elementnext
 Address of the next element at the same level. More...
 

Additional Inherited Members

- Protected Member Functions inherited from libxcks::XCKSDirStruct::Element
ElementcreateDirsAndAddFile (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::FilegetNextFileRec () const
 Gets the next file in the directory structure (recursive). More...
 
XCKSDirStruct::FilegetNextFile (const bool calledFromChild) const
 Gets the next file in the directory structure. More...
 

Detailed Description

An file of the directory structure for XCKS files.

Definition at line 287 of file xcksfilewriter.cpp.

Constructor & Destructor Documentation

◆ File() [1/3]

libxcks::XCKSDirStruct::File::File ( )
delete

Deleted default constructor.

◆ File() [2/3]

libxcks::XCKSDirStruct::File::File ( const File )
delete

Deleted copy constructor.

◆ File() [3/3]

libxcks::XCKSDirStruct::File::File ( const string &  fileName,
XCKSDirStruct::Element parentElement,
XCKSDirStruct::Element previousElement,
void *  elementData = nullptr 
)

Constructor.

Parameters
fileNameName of the file.
parentElementParent of the file.
previousElementAddress of the previous element (can be nullptr if is the first element of the level).
elementDataThe data associated to the file element.

Definition at line 862 of file xcksfilewriter.cpp.

◆ ~File()

virtual libxcks::XCKSDirStruct::File::~File ( )
inlinevirtual

Destructor.

Definition at line 307 of file xcksfilewriter.cpp.

Member Function Documentation

◆ getData()

void* libxcks::XCKSDirStruct::File::getData ( ) const
inlineoverridevirtual

Gets the data associated with the element.

Returns
The data associated with the element.

Reimplemented from libxcks::XCKSDirStruct::Element.

Definition at line 321 of file xcksfilewriter.cpp.

◆ isAFile()

bool libxcks::XCKSDirStruct::File::isAFile ( ) const
inlinefinaloverridevirtual

Does the element is a file?

Returns
true if the element is a file, false otherwise.

Implements libxcks::XCKSDirStruct::Element.

Definition at line 314 of file xcksfilewriter.cpp.

◆ operator=()

File& libxcks::XCKSDirStruct::File::operator= ( const File )
delete

Deleted assignment operator.

◆ setData()

void libxcks::XCKSDirStruct::File::setData ( void *  newData)
inlinefinaloverridevirtual

Sets the data associated with the element.

Parameters
newDataThe data associated with the element.

Reimplemented from libxcks::XCKSDirStruct::Element.

Definition at line 328 of file xcksfilewriter.cpp.

Member Data Documentation

◆ data

void* libxcks::XCKSDirStruct::File::data
protected

Data associated with the element.

Definition at line 290 of file xcksfilewriter.cpp.


The documentation for this class was generated from the following file: