graph 6.0.0
Graph: generic attributed relational graphs
GraphReader Class Reference

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

#include <graph/graph/greader.h>

Public Member Functions

Constructors, destructor
 GraphReader (const std::string &filename, const carto::SyntaxSet &syntax, const carto::AttributedReader::HelperSet &helpers=carto::AttributedReader::HelperSet())
 configure the parametres
 
 GraphReader (const carto::SyntaxSet &syntax, const carto::AttributedReader::HelperSet &helpers=carto::AttributedReader::HelperSet())
 configure the parametres
 
virtual ~GraphReader ()
 
Read method
virtual void read (Graph &graph)
 read a Graph attributes from a file
 
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)
 

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

Referenced by setSyntax().

◆ 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 ( carto::rc_ptr< carto::DataSource > ds)

◆ attach() [2/3]

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

◆ attach() [3/3]

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

◆ 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)

◆ 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)

References GraphReader().

◆ syntaxSet()

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

Definition at line 119 of file greader.h.


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