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


Detailed Description

template<typename _Graph, typename _Traits = DefaultWriterTraits>
class lemon::UEdgeMapWriter< _Graph, _Traits >

The lemon format can store maps in the uedgeset. 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 undirected 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_writer.h>

Inheritance diagram for UEdgeMapWriter< _Graph, _Traits >:

Inheritance graph
[legend]

List of all members.

Public Member Functions

template<typename _LabelWriter >
 UEdgeMapWriter (LemonWriter &_writer, const Graph &_graph, const _LabelWriter &_labelWriter, const std::string &_name=std::string(), bool _forceSort=true)
 Constructor.
virtual ~UEdgeMapWriter ()
 Destructor.
template<typename Map >
UEdgeMapWriterwriteUEdgeMap (std::string label, const Map &map)
template<typename ItemWriter , typename Map >
UEdgeMapWriterwriteUEdgeMap (std::string label, const Map &map, const ItemWriter &iw=ItemWriter())
template<typename Map >
UEdgeMapWriterwriteEdgeMap (std::string label, const Map &map)
 Add a new directed edge map writer command for the writer.
template<typename ItemWriter , typename Map >
UEdgeMapWriterwriteEdgeMap (std::string label, const Map &map, const ItemWriter &iw=ItemWriter())

Protected Member Functions

virtual std::string header ()
 The header of the section.
virtual void write (std::ostream &os)
 Writer function of the section.


Constructor & Destructor Documentation

UEdgeMapWriter ( LemonWriter _writer,
const Graph &  _graph,
const _LabelWriter &  _labelWriter,
const std::string &  _name = std::string(),
bool  _forceSort = true 
) [inline]

Constructor for UEdgeMapWriter. It creates the UEdgeMapWriter and attach it into the given LemonWriter. If the the _forceSort is true then the writer will write the uedges sorted by the labels.

virtual ~UEdgeMapWriter (  )  [inline, virtual]

Destructor for UEdgeMapWriter.


Member Function Documentation

UEdgeMapWriter& writeUEdgeMap ( std::string  label,
const Map &  map 
) [inline]

Add a new undirected edge map writer command for the writer.

UEdgeMapWriter& writeUEdgeMap ( std::string  label,
const Map &  map,
const ItemWriter &  iw = ItemWriter() 
) [inline]

Add a new undirected edge map writer command for the writer.

UEdgeMapWriter& writeEdgeMap ( std::string  label,
const Map &  map 
) [inline]

Add a new directed map writer command for the writer.

UEdgeMapWriter& writeEdgeMap ( std::string  label,
const Map &  map,
const ItemWriter &  iw = ItemWriter() 
) [inline]

Add a new directed map writer command for the writer.

virtual std::string header (  )  [inline, protected, virtual]

It gives back the header of the section.

Implements SectionWriter.

virtual void write ( std::ostream &  os  )  [inline, protected, virtual]

Write the content of the section.

Implements SectionWriter.


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