COIN-OR::LEMON - Graph Library

source: lemon-0.x/src/work/deba/map_defines.h @ 676:7ec5e7e6c7b4

Last change on this file since 676:7ec5e7e6c7b4 was 676:7ec5e7e6c7b4, checked in by Alpar Juttner, 16 years ago

c++ setting for emacs
Empty commands for doxygen

File size: 1.2 KB
Line 
1// -*- c++ -*-
2#ifndef MAP_DEFINES_H
3#define MAP_DEFINES_H
4
5#define CREATE_EDGE_MAP_REGISTRY \
6typedef MapRegistry<Graph, Edge, EdgeIt> EdgeMapRegistry; \
7EdgeMapRegistry edge_maps;
8
9#define CREATE_NODE_MAP_REGISTRY \
10typedef MapRegistry<Graph, Node, NodeIt> NodeMapRegistry; \
11NodeMapRegistry node_maps;
12
13#define CREATE_MAP_REGISTRIES \
14CREATE_NODE_MAP_REGISTRY \
15CREATE_EDGE_MAP_REGISTRY
16
17#define CREATE_NODE_MAP_FACTORY(TemplateFactory) \
18typedef TemplateFactory<NodeMapRegistry> NodeMapFactory;
19
20#define CREATE_EDGE_MAP_FACTORY(TemplateFactory) \
21typedef TemplateFactory<EdgeMapRegistry> EdgeMapFactory;
22
23#define CREATE_MAP_FACTORIES(TemplateFactory) \
24CREATE_NODE_MAP_FACTORY(TemplateFactory) \
25CREATE_EDGE_MAP_FACTORY(TemplateFactory)
26
27#define IMPORT_NODE_MAP(Factory) \
28template <typename V> \
29class NodeMap : public Factory::Map<V> { \
30public: \
31NodeMap() {} \
32NodeMap(Graph& g) : Factory::Map<V>(g, g.node_maps) {} \
33};
34
35#define IMPORT_EDGE_MAP(Factory) \
36template <typename V> \
37class EdgeMap : public Factory::Map<V> { \
38public: \
39EdgeMap() {} \
40EdgeMap(Graph& g) : Factory::Map<V>(g, g.edge_maps) {} \
41};
42
43#define CREATE_MAPS(TemplateFactory) \
44CREATE_MAP_FACTORIES(TemplateFactory) \
45IMPORT_NODE_MAP(NodeMapFactory) \
46IMPORT_EDGE_MAP(EdgeMapFactory)
47
48#endif
Note: See TracBrowser for help on using the repository browser.