adtf_file_library  0.13.1
Public Member Functions | Static Public Attributes | List of all members
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 More...
 
ReferencedFilesExtensionoperator= (ReferencedFilesExtension &&other)
 move Assignment More...
 
 ReferencedFilesExtension (const Reader &reader)
 CTOR to directly read the extension from a Reader. More...
 
 ReferencedFilesExtension (const std::vector< Extension > &extensions)
 CTOR to directly read the extension from a Extension vector. More...
 
 ReferencedFilesExtension (const std::vector< a_util::filesystem::Path > &files)
 CTOR initializer to set the files for referenced files. More...
 
void read (const Reader &reader)
 read the extension from a Reader More...
 
void read (const std::vector< Extension > &extensions)
 read the extension from a Extension vector More...
 
void write (ADTFDatFileWriter &writer) const
 writes the extension to a Reader More...
 
void change (a_util::filesystem::Path filename) const
 exchange the extension of a existing file ( filename ) with the current content of this ReferencedFilesExtension More...
 
std::vector< a_util::filesystem::Path > getFiles () const
 Get the collection of referenced files. More...
 
void setFiles (const std::vector< a_util::filesystem::Path > &files)
 Set the collection of referenced files. More...
 

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:

Copyright © CARIAD SE.
Generated on Fri Apr 19 2024 by doxygen 1.9.1
GIT Commit Hash: 82d535f82776c20b12fc60740bdae991b62444a7