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


Detailed Description

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

The lemon format can store maps in the nodeset 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 node 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 NodeMapReader< _Graph, _Traits >:

Inheritance graph
[legend]

List of all members.

Public Member Functions

template<typename _LabelReader >
 NodeMapReader (LemonReader &_reader, const Graph &_graph, const _LabelReader &_labelReader, const std::string &_name=std::string(), const DefaultSkipper &_skipper=DefaultSkipper())
 Constructor.
virtual ~NodeMapReader ()
 Destructor.
template<typename Map >
NodeMapReaderreadNodeMap (std::string label, Map &map)
template<typename ItemReader , typename Map >
NodeMapReaderreadNodeMap (std::string label, Map &map, const ItemReader &ir=ItemReader())
template<typename ItemReader >
NodeMapReaderskipNodeMap (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

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

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

virtual ~NodeMapReader (  )  [inline, virtual]

Destructor for NodeMapReader.


Member Function Documentation

NodeMapReader& readNodeMap ( std::string  label,
Map &  map 
) [inline]

Add a new node map reader command for the reader.

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

Add a new node map reader command for the reader.

NodeMapReader& skipNodeMap ( std::string  label,
const ItemReader &  ir = ItemReader() 
) [inline]

Add a new node 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