libxcks  0.1.0.1
libxcks::XCKSDirStruct Class Referencefinal

A directories structure for XCKS files. More...

Collaboration diagram for libxcks::XCKSDirStruct:

Classes

class  const_file_iterator
 A forward iterator on files of a directory structure. More...
 
class  Directory
 A directory of the directory structure for XCKS files. More...
 
class  Element
 An element of the directory structure for XCKS files. More...
 
class  File
 An file of the directory structure for XCKS files. More...
 

Public Member Functions

 XCKSDirStruct ()
 Default constructor. More...
 
 XCKSDirStruct (const XCKSDirStruct &)=delete
 Deleted copy constructor. More...
 
XCKSDirStructoperator= (const XCKSDirStruct &)=delete
 Deleted assignment operator. More...
 
const_file_iterator files_begin () const
 Returns an iterator pointing at the first file of the directory structure. More...
 
const_file_iterator files_end () const
 Returns an iterator pointing at the one-after-the-last file of directory structure. More...
 
bool addFile (const filesystem::path &filename, void *data=nullptr)
 Adds a new file in the directory structure. More...
 

Protected Attributes

Elementroot
 Root of the directory structure. More...
 

Detailed Description

A directories structure for XCKS files.

Represents a directories structure with relative paths from a root directory.

Definition at line 64 of file xcksfilewriter.cpp.

Constructor & Destructor Documentation

◆ XCKSDirStruct() [1/2]

libxcks::XCKSDirStruct::XCKSDirStruct ( )
inline

Default constructor.

Definition at line 77 of file xcksfilewriter.cpp.

◆ XCKSDirStruct() [2/2]

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

Deleted copy constructor.

Member Function Documentation

◆ addFile()

bool libxcks::XCKSDirStruct::addFile ( const filesystem::path &  filename,
void *  data = nullptr 
)

Adds a new file in the directory structure.

Parameters
filenameThe name of the file to add (relative form).
dataThe data associated with the file.
Returns
true is the file has been created in the structure, false otherwise.

Definition at line 522 of file xcksfilewriter.cpp.

◆ files_begin()

XCKSDirStruct::const_file_iterator libxcks::XCKSDirStruct::files_begin ( ) const

Returns an iterator pointing at the first file of the directory structure.

Returns
An iterator pointing at the first file of the directory structure.

Definition at line 481 of file xcksfilewriter.cpp.

◆ files_end()

XCKSDirStruct::const_file_iterator libxcks::XCKSDirStruct::files_end ( ) const
inline

Returns an iterator pointing at the one-after-the-last file of directory structure.

Returns
An iterator pointing at the one-after-the-last file of directory structure.

Definition at line 507 of file xcksfilewriter.cpp.

◆ operator=()

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

Deleted assignment operator.

Member Data Documentation

◆ root

Element* libxcks::XCKSDirStruct::root
protected

Root of the directory structure.

Definition at line 71 of file xcksfilewriter.cpp.


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