aimsdata 6.0.0
Neuroimaging data handling
aims::FileFormat< T > Class Template Referenceabstract

Low-level object IO format: each specific format has such a reader / writer. More...

#include <aims/io/fileFormat.h>

Inheritance diagram for aims::FileFormat< T >:

Public Member Functions

virtual ~FileFormat ()
 
virtual bool read (const std::string &filename, T &obj, const carto::AllocatorContext &context, carto::Object options)=0
 
virtual T * read (const std::string &filename, const carto::AllocatorContext &context, carto::Object options)
 Creates an object and reads it.
 
virtual bool write (const std::string &, const T &, carto::Object options=carto::none())
 the base class has a default implementation which only returns false so if your new format only supports read operations, you won't have to bother about the write() function
 
carto::GenericObjectread (const std::string &, const carto::AllocatorContext &, carto::Object)
 

Detailed Description

template<class T>
class aims::FileFormat< T >

Low-level object IO format: each specific format has such a reader / writer.

Definition at line 61 of file fileFormat.h.

Constructor & Destructor Documentation

◆ ~FileFormat()

template<typename T>
aims::FileFormat< T >::~FileFormat ( )
virtual

Definition at line 46 of file fileFormat_d.h.

Member Function Documentation

◆ read() [1/3]

carto::GenericObject * aims::FileFormat< carto::GenericObject >::read ( const std::string & ,
const carto::AllocatorContext & ,
carto::Object  )
inline

Definition at line 46 of file baseFormats_genericobject.h.

◆ read() [2/3]

template<typename T>
T * aims::FileFormat< T >::read ( const std::string & filename,
const carto::AllocatorContext & context,
carto::Object options )
virtual

Creates an object and reads it.

The default implementation just calls the other read() function. The returned object may be deleted by the standard delete

Reimplemented in aims::ArgFormat, aims::GraphBundlesFormat, aims::GraphVolumeFormat, aims::MinfFormat< T >, aims::SomaIOAimsDataFormat< T >, aims::VolumeFormat< T >, aims::VolumeRefAimsFormat< T >, and aims::VolumeRefFormat< T >.

Definition at line 52 of file fileFormat_d.h.

References read().

◆ read() [3/3]

template<class T>
virtual bool aims::FileFormat< T >::read ( const std::string & filename,
T & obj,
const carto::AllocatorContext & context,
carto::Object options )
pure virtual

◆ write()

template<typename T>
bool aims::FileFormat< T >::write ( const std::string & ,
const T & ,
carto::Object options = carto::none() )
virtual

the base class has a default implementation which only returns false so if your new format only supports read operations, you won't have to bother about the write() function

Reimplemented in aims::ArgFormat, aims::MinfFormat< T >, aims::MniObjFormat, aims::TriFormat, and aims::Vrml1Format.

Definition at line 73 of file fileFormat_d.h.

Referenced by aims::Writer< T >::write().


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