graph  5.0.5
Graph: generic attributed relational graphs
GraphReader Class Reference

To read a Graph from a file. More...

#include <graph/graph/greader.h>

Public Member Functions

void open (const std::string &filename) __attribute__((__deprecated__("use attach() instead")))
 
void close ()
 
void attach (std::istream &s, int line_num=1)
 
void attach (carto::rc_ptr< carto::DataSource > ds)
 
void attach (const std::string &filename)
 
virtual std::string name () const
 
int line () const
 
bool operator! () const
 
bool is_open () const
 
bool eof () const
 
carto::rc_ptr< carto::DataSource > dataSource ()
 
const carto::rc_ptr< carto::DataSource > dataSource () const
 
const carto::SyntaxSetsyntaxSet () const
 
void setSyntax (const carto::SyntaxSet &syntax)
 
Constructors, destructor
 GraphReader (const std::string &filename, const carto::SyntaxSet &syntax, const carto::AttributedReader::HelperSet &helpers=carto::AttributedReader::HelperSet())
 configure the parametres More...
 
 GraphReader (const carto::SyntaxSet &syntax, const carto::AttributedReader::HelperSet &helpers=carto::AttributedReader::HelperSet())
 configure the parametres More...
 
virtual ~GraphReader ()
 
Read method
virtual void read (Graph &graph)
 read a Graph attributes from a file More...
 

Detailed Description

To read a Graph from a file.

Definition at line 61 of file greader.h.

Constructor & Destructor Documentation

◆ GraphReader() [1/2]

GraphReader::GraphReader ( const std::string &  filename,
const carto::SyntaxSet syntax,
const carto::AttributedReader::HelperSet &  helpers = carto::AttributedReader::HelperSet() 
)

configure the parametres

Parameters
filenamename of the file to read from
syntax
helpers

◆ GraphReader() [2/2]

GraphReader::GraphReader ( const carto::SyntaxSet syntax,
const carto::AttributedReader::HelperSet &  helpers = carto::AttributedReader::HelperSet() 
)

configure the parametres

Parameters
syntax
helpers

◆ ~GraphReader()

virtual GraphReader::~GraphReader ( )
virtual

Member Function Documentation

◆ attach() [1/3]

void GraphReader::attach ( std::istream &  s,
int  line_num = 1 
)

◆ attach() [2/3]

void GraphReader::attach ( carto::rc_ptr< carto::DataSource >  ds)

◆ attach() [3/3]

void GraphReader::attach ( const std::string &  filename)

◆ close()

void GraphReader::close ( )

◆ dataSource() [1/2]

carto::rc_ptr<carto::DataSource> GraphReader::dataSource ( )

◆ dataSource() [2/2]

const carto::rc_ptr<carto::DataSource> GraphReader::dataSource ( ) const

◆ eof()

bool GraphReader::eof ( ) const

◆ is_open()

bool GraphReader::is_open ( ) const

◆ line()

int GraphReader::line ( ) const

◆ name()

virtual std::string GraphReader::name ( ) const
virtual

◆ open()

void GraphReader::open ( const std::string &  filename)
Deprecated:
{obsolete - use attach()}

◆ operator!()

bool GraphReader::operator! ( ) const

◆ read()

virtual void GraphReader::read ( Graph graph)
virtual

read a Graph attributes from a file

Parameters
graphgraph to read into

◆ setSyntax()

void GraphReader::setSyntax ( const carto::SyntaxSet syntax)

◆ syntaxSet()

const carto::SyntaxSet& GraphReader::syntaxSet ( ) const
inline

Definition at line 119 of file greader.h.

References GRAPH_API, and operator>>().


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