![]() |
aimsdata
4.7.0
Neuroimaging data handling
|
#include <aims/io/writer.h>
Public Member Functions | |
GenericWriter () | |
GenericWriter (const std::string &filename, carto::Object options=carto::none()) | |
virtual | ~GenericWriter () |
template<typename T > | |
bool | write (const T &obj, bool ascii=false, const std::string *format=0) |
Finds the correct format and writes the object. More... | |
void | setFileName (const std::string &fileName) |
set output file name More... | |
const std::string & | fileName () const |
get output file name More... | |
const carto::Object | options () const |
void | setOptions (carto::Object opt) |
virtual std::string | writtenObjectType () const =0 |
virtual std::string | writtenObjectDataType () const =0 |
virtual std::string | writtenObjectFullType () const =0 |
Protected Attributes | |
std::string | _filename |
carto::Object | _options |
|
inline |
|
inlinevirtual |
|
inline |
get output file name
Definition at line 71 of file writer.h.
References _filename.
Referenced by setFileName(), and write().
|
inline |
Definition at line 72 of file writer.h.
References _options.
Referenced by aims::Writer< T >::write().
|
inline |
|
inline |
Definition at line 73 of file writer.h.
References _options, writtenObjectDataType(), writtenObjectFullType(), and writtenObjectType().
bool aims::GenericWriter::write | ( | const T & | obj, |
bool | ascii = false , |
||
const std::string * | format = 0 |
||
) |
Finds the correct format and writes the object.
If format
is specified, this format is tried first, so you can use it to force the format, otherwise it will be determined from the filename extension. If no extension and no format are given, the first working format will be used.
Definition at line 74 of file writer_d.h.
References fileName(), and aims::Writer< T >::write().
Referenced by aims::operator<<(), ~GenericWriter(), and aims::Writer< T >::~Writer().
|
pure virtual |
Implemented in aims::Writer< T >.
Referenced by setOptions(), and aims::Writer< T >::~Writer().
|
pure virtual |
Implemented in aims::Writer< T >.
Referenced by setOptions(), and aims::Writer< T >::~Writer().
|
pure virtual |
Implemented in aims::Writer< T >.
Referenced by setOptions(), and aims::Writer< T >::~Writer().
|
protected |
Definition at line 80 of file writer.h.
Referenced by fileName(), setFileName(), and aims::Writer< T >::write().
|
protected |
Definition at line 81 of file writer.h.
Referenced by options(), setOptions(), and aims::Writer< T >::write().