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 );
162 writer.
write( thing );
GenericWriter(std::ostream &stream)
GenericWriter(carto::rc_ptr< DataSource > ds)
void close()
close the writing DataSource
void flush()
flush the writing DataSource (if still open)
bool write(const T &obj, carto::Object options=carto::none())
Finds the correct format and writes the object.
carto::rc_ptr< DataSource > dataSource()
void attach(std::ostream &stream)
carto::rc_ptr< DataSourceInfo > _datasourceinfo
const carto::rc_ptr< DataSource > dataSource() const
void attach(const std::string &filename)
GenericWriter(const std::string &filename)
void attach(carto::rc_ptr< DataSource > ds)
virtual std::string writtenObjectType() const =0
Generic writer for every format of Aims object.
virtual std::string writtenObjectType() const
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.
soma::GenericWriter & operator<<(soma::GenericWriter &writer, const T &thing)