aimsdata  5.1.2
Neuroimaging data handling
aims::Writer< T > Class Template Reference

Generic writer for every format of Aims object. More...

#include <aims/io/writer.h>

Inheritance diagram for aims::Writer< T >:
Collaboration diagram for aims::Writer< T >:

Public Member Functions

 Writer ()
 
 Writer (const std::string &filename, carto::Object options=carto::none())
 
virtual ~Writer ()
 
virtual bool write (const T &obj, bool ascii=false, const std::string *format=0)
 Finds the correct format and writes the object. More...
 
virtual std::string writtenObjectType () const
 
virtual std::string writtenObjectDataType () const
 
virtual std::string writtenObjectFullType () const
 
- Public Member Functions inherited from aims::GenericWriter
 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)
 

Additional Inherited Members

- Protected Attributes inherited from aims::GenericWriter
std::string _filename
 
carto::Object _options
 

Detailed Description

template<class T>
class aims::Writer< T >

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 FileFormatDictionary with them to store all known file formats.

See also
FileFormatDictionary Reader

Definition at line 93 of file writer.h.

Constructor & Destructor Documentation

◆ Writer() [1/2]

template<class T >
aims::Writer< T >::Writer ( )
inline

Definition at line 96 of file writer.h.

◆ Writer() [2/2]

template<class T >
aims::Writer< T >::Writer ( const std::string &  filename,
carto::Object  options = carto::none() 
)
inline

Definition at line 97 of file writer.h.

◆ ~Writer()

template<class T >
virtual aims::Writer< T >::~Writer ( )
inlinevirtual

Definition at line 100 of file writer.h.

Member Function Documentation

◆ write()

template<class T >
bool aims::Writer< T >::write ( const T &  obj,
bool  ascii = false,
const std::string *  format = 0 
)
virtual

◆ writtenObjectDataType()

template<class T >
std::string aims::Writer< T >::writtenObjectDataType
virtual

Implements aims::GenericWriter.

Definition at line 94 of file writer_d.h.

References carto::DataTypeCode< class >::dataType().

◆ writtenObjectFullType()

template<class T >
std::string aims::Writer< T >::writtenObjectFullType
virtual

Implements aims::GenericWriter.

Definition at line 101 of file writer_d.h.

References carto::DataTypeCode< class >::name().

◆ writtenObjectType()

template<class T >
std::string aims::Writer< T >::writtenObjectType
virtual

Implements aims::GenericWriter.

Definition at line 87 of file writer_d.h.

References carto::DataTypeCode< class >::objectType().


The documentation for this class was generated from the following files: