34#ifndef SOMAIO_WRITER_AWRITER_H
35#define SOMAIO_WRITER_AWRITER_H
39#include <cartobase/config/cartobase_config.h>
40#ifndef CARTOBASE_OBJECT_SYNTAX_H
41 #include <cartobase/object/syntax.h>
43#include <cartobase/object/object.h>
103 void open(
const std::string& filename );
117 virtual std::string
name()
const;
153 const std::set<std::string>& attributes,
154 std::string::size_type size );
162 const std::set<std::string>& attributes,
163 std::string::size_type size )
200 std::string _filename;
#define __deprecated__(msg)
void open(const std::string &filename)
open a new file
void(* Helper)(const carto::GenericObject &, const std::string &, std::ostream &)
bool is_open() const
is the stream open?
void close()
close or detach the stream
carto::SyntaxSet _rules
rules for every syntactic attribute
std::ostream * _stream
C++ stream to write into.
void writeAttributes(const carto::GenericObject &object)
void writeAttributes(const carto::GenericObject &object, const std::set< std::string > &attributes, std::string::size_type size)
void attach(std::ostream &s)
attach to an existing (and open) stream
bool operator!() const
return the status of the stream
void setSyntax(const carto::SyntaxSet &rules)
virtual std::string name() const
name of the file to read from
void writeAttributes(const carto::GenericObject *object) __attribute__((__deprecated__))
void writeAttributes(const carto::GenericObject *object, const std::set< std::string > &attributes, std::string::size_type size) __attribute__((__deprecated__))
const carto::SyntaxSet & getSyntax() const
AttributedWriter(const carto::SyntaxSet &rules, const HelperSet &helpers=HelperSet())
configure the parameters
virtual ~AttributedWriter()
clean up
std::map< std::string, Helper > HelperSet
AttributedWriter(const std::string &filename, const carto::SyntaxSet &rules, const HelperSet &helpers=HelperSet())
configure the parameters
std::map< std::string, Syntax > SyntaxSet