34 #ifndef SOMAIO_IO_WRITER_H 35 #define SOMAIO_IO_WRITER_H 72 void attach(
const std::string & filename );
73 void attach( std::ostream & stream );
89 return write( *obj, options );
110 Writer(
const std::string& filename );
111 Writer( std::ostream & stream );
128 virtual bool write(
const T & obj,
130 int passbegin = 1 ,
int passend = 4 );
139 int passbegin,
int passend )
142 return w.
write( *obj, options, passbegin, passend );
153 writer.
write( thing );
160 operator << ( soma::Writer<T> & writer,
const T & thing )
162 writer.
write( thing );
const carto::rc_ptr< DataSource > dataSource() const
virtual std::string writtenObjectType() const =0
Generic writer for every format of Aims object.
void flush()
flush the writing DataSource (if still open)
void close()
close the writing DataSource
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.
carto::rc_ptr< DataSourceInfo > _datasourceinfo
void attach(carto::rc_ptr< DataSource > ds)
std::ostream & operator<<(std::ostream &os, const MemoryAllocator &thing)
bool write(const T &obj, carto::Object options=carto::none())
Finds the correct format and writes the object.