EdgeMapReader< _Graph, _Traits > Class Template Reference
[Section readers and writers]


Detailed Description

template<typename _Graph, typename _Traits = DefaultReaderTraits>
class lemon::EdgeMapReader< _Graph, _Traits >

The lemon format can store maps in the edgeset sections. This class let you make distinict section to store maps. The main purpose of this class is a logical separation of some maps. The other useful application could be to store paths in edge maps.

The first line of the section contains the names of the maps separated with white spaces. Each next line describes an item in the itemset, and contains in the first column the label of the item and then the mapped values for each map. #include <lemon/lemon_reader.h>

Inheritance diagram for EdgeMapReader< _Graph, _Traits >:

Inheritance graph
[legend]

List of all members.

Public Member Functions

template<typename _LabelReader >
 EdgeMapReader (LemonReader &_reader, const Graph &_graph, const _LabelReader &_labelReader, const std::string &_name=std::string(), const DefaultSkipper &_skipper=DefaultSkipper())
 Constructor.
virtual ~EdgeMapReader ()
 Destructor.
template<typename Map >
EdgeMapReaderreadEdgeMap (std::string label, Map &map)
template<typename ItemReader , typename Map >
EdgeMapReaderreadEdgeMap (std::string label, Map &map, const ItemReader &ir=ItemReader())
template<typename ItemReader >
EdgeMapReaderskipEdgeMap (std::string label, const ItemReader &ir=ItemReader())

Protected Member Functions

virtual bool header (const std::string &line)
 Gives back true when the SectionReader can process the section with the given header line.
virtual void read (std::istream &is)
 Reader function of the section.


Constructor & Destructor Documentation

EdgeMapReader ( LemonReader _reader,
const Graph &  _graph,
const _LabelReader &  _labelReader,
const std::string &  _name = std::string(),
const DefaultSkipper _skipper = DefaultSkipper() 
) [inline]

Constructor for EdgeMapReader. It creates the EdgeMapReader and attach it into the given LemonReader. The reader will read the section when the section_name and the _name are the same.

virtual ~EdgeMapReader (  )  [inline, virtual]

Destructor for EdgeMapReader.


Member Function Documentation

EdgeMapReader& readEdgeMap ( std::string  label,
Map &  map 
) [inline]

Add a new edge map reader command for the reader.

EdgeMapReader& readEdgeMap ( std::string  label,
Map &  map,
const ItemReader &  ir = ItemReader() 
) [inline]

Add a new edge map reader command for the reader.

EdgeMapReader& skipEdgeMap ( std::string  label,
const ItemReader &  ir = ItemReader() 
) [inline]

Add a new edge map skipper command for the reader.

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

It gives back true when the header line starts with @mapset, and the header line's name and the mapset's name are the same.

Implements SectionReader.

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

It reads the content of the section.

Implements SectionReader.


Generated on Thu Jun 4 04:05:07 2009 for LEMON by  doxygen 1.5.9