34 #ifndef SOMAIO_READER_AREADER_H
35 #define SOMAIO_READER_AREADER_H
41 #ifndef CARTOBASE_OBJECT_SYNTAX_H
110 void open(
const std::string& filename);
113 void attach( std::istream & stream,
int line_num = 1 );
128 virtual std::string
name()
const;
169 const std::string& semantic);
173 const std::string& semantic)
To read GenericObject from a file.
AttributedReader(const carto::SyntaxSet &rules, const HelperSet &helpers=HelperSet())
configure the parameters
virtual ~AttributedReader()
clean up
void close()
detach or close the stream
std::map< std::string, Helper > HelperSet
carto::rc_ptr< DataSource > dataSource()
HelperSet _helpers
helper functions read basic data type
AttributedReader(carto::rc_ptr< DataSource > ds, const carto::SyntaxSet &rules, const HelperSet &helpers=HelperSet())
carto::SyntaxSet _rules
rules for every syntactic attribute
bool operator!() const
return the status of the stream
carto::rc_ptr< DataSource > _datasource
filtering stream to read from
bool eof() const
have we hit EOF?
void readAttribute(carto::GenericObject &object, const std::string &semantic)
construct the value of a semantic attribute
virtual std::string name() const
name of the file to read from
void open(const std::string &filename)
open a new file
void attach(std::istream &stream, int line_num=1)
attach to an existing istream
AttributedReader(const std::string &filename, const carto::SyntaxSet &rules, const HelperSet &helpers=HelperSet())
configure the parameters
void readAttribute(carto::GenericObject *object, const std::string &semantic) __attribute__((__deprecated__))
bool is_open() const
is the stream open?
void attach(carto::rc_ptr< DataSource > ds)
Abstraction layer for various data sources (file, buffer, socket...).
std::map< std::string, Syntax > SyntaxSet