libtgd 4.3
A library that makes working with multidimensional arrays in C++ easy
|
The exporter class exports arrays to files or streams. More...
#include <io.hpp>
Public Member Functions | |
Exporter () | |
Constructor. This must be initialized with initialize(). | |
Exporter (const std::string &fileName, bool append=Overwrite, const TagList &hints=TagList()) | |
Constructor. The file name is required. The special file name "-" is interpreted as standard output. If the append flag is set, new arrays will be appended to the file (if the file format supports it) instead of overwriting the old file contents. The optional hints may include parameters for the file format, e.g. about compression level. | |
~Exporter () | |
Destructor. | |
void | initialize (const std::string &fileName, bool append=Overwrite, const TagList &hints=TagList()) |
Initialize. See the constructor documentation. | |
std::string | fileName () const |
Returns the file name. | |
Error | writeArray (const ArrayContainer &array) |
Writes the array to the file. | |
The exporter class exports arrays to files or streams.
TGD::Exporter::Exporter | ( | ) |
Constructor. This must be initialized with initialize().
TGD::Exporter::Exporter | ( | const std::string & | fileName, |
bool | append = Overwrite, | ||
const TagList & | hints = TagList() ) |
Constructor. The file name is required. The special file name "-" is interpreted as standard output. If the append flag is set, new arrays will be appended to the file (if the file format supports it) instead of overwriting the old file contents. The optional hints may include parameters for the file format, e.g. about compression level.
Note that this initialization does not try to open the file yet, it merely sets up the necessary information (and thus cannot fail). The functions that access the data will report any errors that might occur.
TGD::Exporter::~Exporter | ( | ) |
Destructor.
|
inline |
Returns the file name.
void TGD::Exporter::initialize | ( | const std::string & | fileName, |
bool | append = Overwrite, | ||
const TagList & | hints = TagList() ) |
Initialize. See the constructor documentation.
Error TGD::Exporter::writeArray | ( | const ArrayContainer & | array | ) |
Writes the array to the file.