|
soma-io 6.0.6
|
Generic writer for every format of Aims object. More...
#include <soma-io/io/writer.h>


Public Member Functions | |
| Writer () | |
| Writer (carto::rc_ptr< DataSource > ds) | |
| Writer (const std::string &filename) | |
| Writer (std::ostream &stream) | |
| virtual | ~Writer () |
| virtual bool | write (const T &obj, carto::Object options=carto::none(), int passbegin=1, int passend=4) |
| Finds the correct format and writes the object. | |
| virtual std::string | writtenObjectType () const |
| bool | write (const carto::Object &obj, carto::Object options, int passbegin, int passend) |
Public Member Functions inherited from soma::GenericWriter | |
| GenericWriter () | |
| GenericWriter (carto::rc_ptr< DataSource > ds) | |
| GenericWriter (const std::string &filename) | |
| GenericWriter (std::ostream &stream) | |
| virtual | ~GenericWriter () |
| template<typename T> | |
| bool | write (const T &obj, carto::Object options=carto::none()) |
| Finds the correct format and writes the object. | |
| const carto::rc_ptr< DataSource > | dataSource () const |
| carto::rc_ptr< DataSource > | dataSource () |
| void | attach (carto::rc_ptr< DataSource > ds) |
| void | attach (const std::string &filename) |
| void | attach (std::ostream &stream) |
| void | flush () |
| flush the writing DataSource (if still open) | |
| void | close () |
| close the writing DataSource | |
| template<> | |
| bool | write (const carto::Object &obj, carto::Object options) |
Additional Inherited Members | |
Protected Attributes inherited from soma::GenericWriter | |
| carto::rc_ptr< DataSourceInfo > | _datasourceinfo |
Generic writer for every format of Aims object.
The Writer classes are built on the same model as the Reader classes and share the same FormatDictionary with them to store all known file formats.
See IO system general explanations on how to use Reader and Writer classes.
| soma::Writer< T >::Writer | ( | ) |
Definition at line 74 of file writer_d.h.
References soma::GenericWriter::GenericWriter(), and Writer().
Referenced by write(), Writer(), Writer(), Writer(), and Writer().
| soma::Writer< T >::Writer | ( | carto::rc_ptr< DataSource > | ds | ) |
Definition at line 80 of file writer_d.h.
References soma::GenericWriter::GenericWriter(), and Writer().
| soma::Writer< T >::Writer | ( | const std::string & | filename | ) |
Definition at line 86 of file writer_d.h.
References soma::GenericWriter::GenericWriter(), and Writer().
| soma::Writer< T >::Writer | ( | std::ostream & | stream | ) |
Definition at line 92 of file writer_d.h.
References soma::GenericWriter::GenericWriter(), and Writer().
|
virtual |
|
inline |
Definition at line 137 of file writer.h.
References soma::GenericWriter::dataSource(), write(), and Writer().
|
virtual |
Finds the correct format and writes the object.
Options can be passed to specify some writing parameters. The most important is the format ("format" property): if it 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 available). If no extension and no format are given, the first working format will be used. It is possible to specify which passes to process through passbegin and passend.
Definition at line 121 of file writer_d.h.
References soma::GenericWriter::_datasourceinfo, carto::FileUtil::extension(), carto::rc_ptr< typename T >::get(), carto::io_error::keepExceptionPriority(), carto::io_error::launchExcept(), localMsg, carto::DataTypeCode< class T >::name(), carto::toString(), carto::Object::value(), soma::FormatWriter< T >::write(), write(), soma::FormatDictionary< T >::writeExtensions(), and soma::FormatDictionary< T >::writeFormat().
Referenced by soma::GenericWriter::write(), write(), and write().
|
virtual |
Implements soma::GenericWriter.
Definition at line 104 of file writer_d.h.
References carto::DataTypeCode< class T >::name(), and writtenObjectType().
Referenced by writtenObjectType().