adtf_file_library  0.13.2
file_extensions.h
Go to the documentation of this file.
1 
17 #ifndef ADTF_FILE_EXTENSIONS
18 #define ADTF_FILE_EXTENSIONS
19 
22 
23 namespace adtf_file
24 {
25 
31 {
32  public:
36  static constexpr const char* const referenced_files_id = "referencedfiles";
37 
62  ReferencedFilesExtension(const std::vector<Extension>& extensions);
67  ReferencedFilesExtension(const std::vector<a_util::filesystem::Path>& files);
68 
73  void read(const Reader& reader);
74 
79  void read(const std::vector<Extension>& extensions);
80 
85  void write(ADTFDatFileWriter& writer) const;
86 
93  void change(a_util::filesystem::Path filename) const;
94 
99  std::vector<a_util::filesystem::Path> getFiles() const
100  {
101  return _files;
102  }
107  void setFiles(const std::vector<a_util::filesystem::Path>& files)
108  {
109  _files = files;
110  }
111  private:
112  std::vector<a_util::filesystem::Path> _files;
113 };
114 
115 }
116 
117 #endif //_ADTF_FILE_EXTENSIONS_
Default ADTF DAT File Writer to write an ADTF DAT File (IFHD file with ADTF type and sample content).
Definition: adtf_file_writer.h:272
Definition: reader.h:173
Referenced File Extension Interpreter to hold a collection of file paths. This class is ables to read...
Definition: file_extensions.h:31
ReferencedFilesExtension(const std::vector< Extension > &extensions)
CTOR to directly read the extension from a Extension vector.
void setFiles(const std::vector< a_util::filesystem::Path > &files)
Set the collection of referenced files.
Definition: file_extensions.h:107
void read(const std::vector< Extension > &extensions)
read the extension from a Extension vector
std::vector< a_util::filesystem::Path > getFiles() const
Get the collection of referenced files.
Definition: file_extensions.h:99
ReferencedFilesExtension(const Reader &reader)
CTOR to directly read the extension from a Reader.
ReferencedFilesExtension & operator=(ReferencedFilesExtension &&other)
move Assignment
void read(const Reader &reader)
read the extension from a Reader
void write(ADTFDatFileWriter &writer) const
writes the extension to a Reader
ReferencedFilesExtension(const std::vector< a_util::filesystem::Path > &files)
CTOR initializer to set the files for referenced files.
void change(a_util::filesystem::Path filename) const
exchange the extension of a existing file ( filename ) with the current content of this ReferencedFil...
static constexpr const char *const referenced_files_id
Id for the extension.
Definition: file_extensions.h:36
ReferencedFilesExtension(ReferencedFilesExtension &&other)
move CTOR
namespace for ADTF File library
Definition: adtf2_adtf_core_media_sample_deserializer.h:25

Copyright © CARIAD SE.
Generated on Mon Jun 10 2024 by doxygen 1.9.1
GIT Commit Hash: eb3af397a6b49ad6fcad9a60d8277d909b458b48