ADTF File Library
Loading...
Searching...
No Matches
adtf_file::ReferencedFilesExtension Class Reference

Referenced File Extension Interpreter to hold a collection of file paths. This class is ables to read and write the collection of file paths as data content to a Reader extensions. More...

#include <file_extensions.h>

Public Member Functions

 ReferencedFilesExtension ()=default
 CTOR.
 
 ReferencedFilesExtension (ReferencedFilesExtension &&other)
 move CTOR
 
ReferencedFilesExtensionoperator= (ReferencedFilesExtension &&other)
 move Assignment
 
 ReferencedFilesExtension (const Reader &reader)
 CTOR to directly read the extension from a Reader.
 
 ReferencedFilesExtension (const std::vector< Extension > &extensions)
 CTOR to directly read the extension from a Extension vector.
 
 ReferencedFilesExtension (const std::vector< a_util::filesystem::Path > &files)
 CTOR initializer to set the files for referenced files.
 
void read (const Reader &reader)
 read the extension from a Reader
 
void read (const std::vector< Extension > &extensions)
 read the extension from a Extension vector
 
void write (ADTFDatFileWriter &writer) const
 writes the extension to a Reader
 
void change (a_util::filesystem::Path filename) const
 exchange the extension of a existing file ( filename ) with the current content of this ReferencedFilesExtension
 
std::vector< a_util::filesystem::Path > getFiles () const
 Get the collection of referenced files.
 
void setFiles (const std::vector< a_util::filesystem::Path > &files)
 Set the collection of referenced files.
 

Static Public Attributes

static constexpr const char *const referenced_files_id = "referencedfiles"
 Id for the extension.
 

Detailed Description

Referenced File Extension Interpreter to hold a collection of file paths. This class is ables to read and write the collection of file paths as data content to a Reader extensions.

Constructor & Destructor Documentation

◆ ReferencedFilesExtension() [1/4]

adtf_file::ReferencedFilesExtension::ReferencedFilesExtension ( ReferencedFilesExtension && other)

move CTOR

Parameters
otherthe extension to move

◆ ReferencedFilesExtension() [2/4]

adtf_file::ReferencedFilesExtension::ReferencedFilesExtension ( const Reader & reader)

CTOR to directly read the extension from a Reader.

Parameters
readerthe reader instance to read the referenced file extension from

◆ ReferencedFilesExtension() [3/4]

adtf_file::ReferencedFilesExtension::ReferencedFilesExtension ( const std::vector< Extension > & extensions)

CTOR to directly read the extension from a Extension vector.

Parameters
extensionsthe extension vector

◆ ReferencedFilesExtension() [4/4]

adtf_file::ReferencedFilesExtension::ReferencedFilesExtension ( const std::vector< a_util::filesystem::Path > & files)

CTOR initializer to set the files for referenced files.

Parameters
filesthe vector of referenced files

Member Function Documentation

◆ change()

void adtf_file::ReferencedFilesExtension::change ( a_util::filesystem::Path filename) const

exchange the extension of a existing file ( filename ) with the current content of this ReferencedFilesExtension

Parameters
filenamethe file to change
Remarks
This function can only be used for IFHD files and uses NO Reader interface.
Exceptions
std::invalid_argument,std::runtime_error,exceptions::ErrorFileAccess

◆ getFiles()

std::vector< a_util::filesystem::Path > adtf_file::ReferencedFilesExtension::getFiles ( ) const
inline

Get the collection of referenced files.

Returns
std::vector<a_util::filesystem::Path>

◆ operator=()

ReferencedFilesExtension & adtf_file::ReferencedFilesExtension::operator= ( ReferencedFilesExtension && other)

move Assignment

Parameters
otherthe extension to move
Returns
*this

◆ read() [1/2]

void adtf_file::ReferencedFilesExtension::read ( const Reader & reader)

read the extension from a Reader

Parameters
readerthe reader instance to read the referenced file extension from

◆ read() [2/2]

void adtf_file::ReferencedFilesExtension::read ( const std::vector< Extension > & extensions)

read the extension from a Extension vector

Parameters
extensionsthe extension vector

◆ setFiles()

void adtf_file::ReferencedFilesExtension::setFiles ( const std::vector< a_util::filesystem::Path > & files)
inline

Set the collection of referenced files.

Parameters
files

◆ write()

void adtf_file::ReferencedFilesExtension::write ( ADTFDatFileWriter & writer) const

writes the extension to a Reader

Parameters
writerthe reader instance to write the referenced file extension to

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