Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

ContentReader Class Reference
[Input Output]

#include <lemon/lemon_reader.h>

Inherits LemonReader::SectionReader.

Inheritance diagram for ContentReader:

Inheritance graph
[legend]
List of all members.

Detailed Description

SectionReader for retrieve what is in the file. If you want to know which sections, maps and items are in the file use the next code:
      LemonReader reader("input.lgf");
      ContentReader content(reader);
      reader.run();


Public Member Functions

 ContentReader (LemonReader &_reader)
 Constructor.
virtual ~ContentReader ()
 Desctructor.
int nodeSetNum () const
 Gives back how many nodesets are in the file.
std::string nodeSetName (int index) const
 Gives back the name of nodeset on the indiced position.
const std::vector< std::string > & nodeSetMaps (int index) const
 Gives back the map names of nodeset on the indiced position.
int edgeSetNum () const
 Gives back how many edgesets are in the file.
std::string edgeSetName (int index) const
 Gives back the name of edgeset on the indiced position.
const std::vector< std::string > & edgeSetMaps (int index) const
 Gives back the map names of edgeset on the indiced position.
int undirEdgeSetNum () const
 Gives back how many undirected edgesets are in the file.
std::string undirEdgeSetName (int index) const
 Gives back the name of undirected edgeset on the indiced position.
const std::vector< std::string > & undirEdgeSetMaps (int index) const
 Gives back the map names of undirected edgeset on the indiced position.
int nodesNum () const
 Gives back how many labeled nodes section are in the file.
std::string nodesName (int index) const
 Gives back the name of labeled nodes section on the indiced position.
const std::vector< std::string > & nodesItems (int index) const
 Gives back the names of the labeled nodes in the indiced section.
int edgesNum () const
 Gives back how many labeled edges section are in the file.
std::string edgesName (int index) const
 Gives back the name of labeled edges section on the indiced position.
const std::vector< std::string > & edgesItems (int index) const
 Gives back the names of the labeled edges in the indiced section.
int undirEdgesNum () const
 Gives back how many labeled undirected edges section are in the file.
std::string undirEdgesName (int index) const
 Gives back the name of labeled undirected edges section on the indiced position.
const std::vector< std::string > & undirEdgesItems (int index) const
 Gives back the names of the labeled undirected edges in the indiced section.
int attributesNum () const
 Gives back how many attributes section are in the file.
std::string attributesName (int index) const
 Gives back the name of attributes section on the indiced position.
const std::vector< std::string > & attributesItems (int index) const
 Gives back the names of the attributes in the indiced section.

Protected Member Functions

bool header (const std::string &line)
 Gives back true when the SectionReader can process the section with the given header line.
void read (std::istream &is)
 Retrieve the items from various sections.


Constructor & Destructor Documentation

ContentReader LemonReader _reader  )  [inline]
 

Constructor for

virtual ~ContentReader  )  [inline, virtual]
 

Desctructor.


Member Function Documentation

int nodeSetNum  )  const [inline]
 

Gives back how many nodesets are in the file.

std::string nodeSetName int  index  )  const [inline]
 

Gives back the name of nodeset on the indiced position.

const std::vector<std::string>& nodeSetMaps int  index  )  const [inline]
 

Gives back the map names of nodeset on the indiced position.

int edgeSetNum  )  const [inline]
 

Gives back how many edgesets are in the file.

std::string edgeSetName int  index  )  const [inline]
 

Gives back the name of edgeset on the indiced position.

const std::vector<std::string>& edgeSetMaps int  index  )  const [inline]
 

Gives back the map names of edgeset on the indiced position.

int undirEdgeSetNum  )  const [inline]
 

Gives back how many undirected edgesets are in the file.

std::string undirEdgeSetName int  index  )  const [inline]
 

Gives back the name of undirected edgeset on the indiced position.

const std::vector<std::string>& undirEdgeSetMaps int  index  )  const [inline]
 

Gives back the map names of undirected edgeset on the indiced position.

int nodesNum  )  const [inline]
 

Gives back how many labeled nodes section are in the file.

std::string nodesName int  index  )  const [inline]
 

Gives back the name of labeled nodes section on the indiced position.

const std::vector<std::string>& nodesItems int  index  )  const [inline]
 

Gives back the names of the labeled nodes in the indiced section.

int edgesNum  )  const [inline]
 

Gives back how many labeled edges section are in the file.

std::string edgesName int  index  )  const [inline]
 

Gives back the name of labeled edges section on the indiced position.

const std::vector<std::string>& edgesItems int  index  )  const [inline]
 

Gives back the names of the labeled edges in the indiced section.

int undirEdgesNum  )  const [inline]
 

Gives back how many labeled undirected edges section are in the file.

std::string undirEdgesName int  index  )  const [inline]
 

Gives back the name of labeled undirected edges section on the indiced position.

const std::vector<std::string>& undirEdgesItems int  index  )  const [inline]
 

Gives back the names of the labeled undirected edges in the indiced section.

int attributesNum  )  const [inline]
 

Gives back how many attributes section are in the file.

std::string attributesName int  index  )  const [inline]
 

Gives back the name of attributes section on the indiced position.

const std::vector<std::string>& attributesItems int  index  )  const [inline]
 

Gives back the names of the attributes in the indiced section.

bool header const std::string line  )  [inline, protected, virtual]
 

It gives back true when the section is common section.

Implements LemonReader::SectionReader.

void read std::istream is  )  [inline, protected, virtual]
 

Retrieve the items from various sections.

Implements LemonReader::SectionReader.


The documentation for this class was generated from the following file:
Generated on Sat Aug 27 14:15:49 2005 for LEMON by  doxygen 1.4.4