# HG changeset patch # User deba # Date 1107773405 0 # Node ID cfccb33ecf7b2fba22cdfdba2d6e87bc69ab7693 # Parent 56b07afdbf8dcf18736c090b9485e35979227cd4 Removing graph_defines.h diff -r 56b07afdbf8d -r cfccb33ecf7b src/lemon/graph_wrapper.h --- a/src/lemon/graph_wrapper.h Mon Feb 07 10:49:44 2005 +0000 +++ b/src/lemon/graph_wrapper.h Mon Feb 07 10:50:05 2005 +0000 @@ -28,7 +28,6 @@ #include #include #include -#include #include namespace lemon { diff -r 56b07afdbf8d -r cfccb33ecf7b src/lemon/map_defines.h --- a/src/lemon/map_defines.h Mon Feb 07 10:49:44 2005 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,227 +0,0 @@ -/* -*- C++ -*- - * src/lemon/map_defines.h - Part of LEMON, a generic C++ optimization library - * - * Copyright (C) 2004 Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport - * (Egervary Combinatorial Optimization Research Group, EGRES). - * - * Permission to use, modify and distribute this software is granted - * provided that this copyright notice appears in all copies. For - * precise terms see the accompanying LICENSE file. - * - * This software is provided "AS IS" with no warranty of any kind, - * express or implied, and with no claim as to its suitability for any - * purpose. - * - */ - -#ifndef LEMON_MAP_DEFINES_H -#define LEMON_MAP_DEFINES_H - -///\ingroup graphmaps -///\file -///\brief Defines to help creating graph maps. - -/// \addtogroup graphmapfactory -/// @{ - -/** Creates the EdgeMapRegistry type an declare a mutable instance - * named edge_maps. - */ -#define CREATE_EDGE_MAP_REGISTRY \ -typedef MapRegistry EdgeMapRegistry; \ -mutable EdgeMapRegistry edge_maps; - -/** Creates the NodeMapRegistry type an declare a mutable instance - * named node_maps. - */ -#define CREATE_NODE_MAP_REGISTRY \ -typedef MapRegistry NodeMapRegistry; \ -mutable NodeMapRegistry node_maps; - -/** Creates both map registries. - */ -#define CREATE_MAP_REGISTRIES \ -CREATE_NODE_MAP_REGISTRY \ -CREATE_EDGE_MAP_REGISTRY - -/** Creates a map from a template map. The import method is - * an overloading of the map type. - * The reason to use these macro is that the c++ does not support - * the template typedefs. If a future release of the c++ - * supports this feature it should be fixed. - */ -#define CREATE_NODE_MAP(DynMap) \ -template \ -class NodeMap : public DynMap { \ -public: \ -typedef DynMap Parent; \ -NodeMap(const typename Parent::Graph& g) \ - : Parent(g, g.node_maps) {} \ -NodeMap(const typename Parent::Graph& g, const _Value& v) \ - : Parent(g, g.node_maps, v) {} \ -NodeMap(const NodeMap& copy) : Parent(static_cast(copy)) {} \ -template \ -NodeMap(const NodeMap& copy) \ - : Parent(static_cast::Parent&>(copy)) {} \ -NodeMap& operator=(const NodeMap& copy) { \ - Parent::operator=(static_cast(copy));\ - return *this; \ -} \ -template \ -NodeMap& operator=(const NodeMap& copy) { \ - Parent::operator=(static_cast::Parent&>(copy));\ - return *this; \ -} \ -}; - -/** Creates a map from a template map. The import method is - * an overloading of the map type. - * The reason to use these macro is that the c++ does not support - * the template typedefs. If a future release of the c++ - * supports this feature it should be fixed. - */ -#define CREATE_EDGE_MAP(DynMap) \ -template \ -class EdgeMap : public DynMap { \ -public: \ -typedef DynMap Parent; \ -\ -EdgeMap(const typename Parent::Graph& g) \ - : Parent(g, g.edge_maps) {} \ -EdgeMap(const typename Parent::Graph& g, const _Value& v) \ - : Parent(g, g.edge_maps, v) {} \ -EdgeMap(const EdgeMap& copy) : Parent(static_cast(copy)) {} \ -template \ -EdgeMap(const EdgeMap& copy) \ - : Parent(static_cast::Parent&>(copy)) {} \ -EdgeMap& operator=(const EdgeMap& copy) { \ - Parent::operator=(static_cast(copy));\ - return *this; \ -} \ -template \ -EdgeMap& operator=(const EdgeMap& copy) { \ - Parent::operator=(static_cast::Parent&>(copy));\ - return *this; \ -} \ -}; - -/** This macro creates both maps. - */ -#define CREATE_MAPS(DynMap) \ -CREATE_NODE_MAP(DynMap) \ -CREATE_EDGE_MAP(DynMap) - -/** This macro creates MapRegistry for Symmetric Edge Maps. - */ -#define CREATE_SYM_EDGE_MAP_REGISTRY \ -typedef MapRegistry SymEdgeMapRegistry; \ -mutable SymEdgeMapRegistry sym_edge_maps; - - -/** Creates a map from a template map. The import method is - * an overloading of the map type. - * The reason to use these macro is that the c++ does not support - * the template typedefs. If a future release of the c++ - * supports this feature it should be fixed. - */ -#define CREATE_SYM_EDGE_MAP(DynMap) \ -template \ -class SymEdgeMap : public DynMap { \ -public: \ -typedef DynMap Parent; \ -\ -SymEdgeMap(const typename Parent::Graph& g) \ - : Parent(g, g.sym_edge_maps) {} \ -SymEdgeMap(const typename Parent::Graph& g, const _Value& v) \ - : Parent(g, g.sym_edge_maps, v) {} \ -SymEdgeMap(const SymEdgeMap& copy) \ - : Parent(static_cast(copy)) {} \ -template \ -SymEdgeMap(const NodeMap& copy) \ - : Parent(static_cast::Parent&>(copy)) {} \ -SymEdgeMap& operator=(const SymEdgeMap& copy) { \ - Parent::operator=(static_cast(copy));\ - return *this; \ -} \ -template \ -SymEdgeMap& operator=(const SymEdgeMap& copy) { \ - Parent::operator=(static_cast::Parent&>(copy));\ - return *this; \ -} \ -}; - -/** This is a macro to import an node map into a graph class. - */ -#define IMPORT_NODE_MAP(From, from, To, to) \ -template \ -class NodeMap : public From::template NodeMap<_Value> { \ -\ -public: \ -typedef typename From::template NodeMap<_Value> Parent; \ -\ -NodeMap(const To& to) \ - : Parent(static_cast(from)) { } \ -NodeMap(const To& to, const _Value& value) \ - : Parent(static_cast(from), value) { } \ -NodeMap(const NodeMap& copy) \ - : Parent(static_cast(copy)) {} \ -template \ -NodeMap(const NodeMap& copy) \ - : Parent(static_cast::Parent&>(copy)) {} \ -NodeMap& operator=(const NodeMap& copy) { \ - Parent::operator=(static_cast(copy)); \ - return *this; \ -} \ -template \ -NodeMap& operator=(const NodeMap& copy) { \ - Parent::operator=(static_cast::Parent&>(copy));\ - return *this; \ -} \ -}; - -/** This is a macro to import an edge map into a graph class. - */ -#define IMPORT_EDGE_MAP(From, from, To, to) \ -template \ -class EdgeMap : public From::template EdgeMap<_Value> { \ -\ -public: \ -typedef typename From::template EdgeMap<_Value> Parent; \ -\ -EdgeMap(const To& to) \ - : Parent(static_cast(from)) { } \ -EdgeMap(const To& to, const _Value& value) \ - : Parent(static_cast(from), value) { } \ -EdgeMap(const EdgeMap& copy) \ - : Parent(static_cast(copy)) {} \ -template \ -EdgeMap(const EdgeMap& copy) \ - : Parent(static_cast::Parent&>(copy)) {} \ -EdgeMap& operator=(const EdgeMap& copy) { \ - Parent::operator=(static_cast(copy)); \ - return *this; \ -} \ -template \ -EdgeMap& operator=(const EdgeMap& copy) { \ - Parent::operator=(static_cast::Parent&>(copy));\ - return *this; \ -} \ -}; - -#define KEEP_EDGE_MAP(From, To) \ -IMPORT_EDGE_MAP(From, graph, To, graph) - - -#define KEEP_NODE_MAP(From, To) \ -IMPORT_NODE_MAP(From, graph, To, graph) - -/** This is a macro to keep the node and edge maps for a graph class. - */ -#define KEEP_MAPS(From, To) \ -KEEP_EDGE_MAP(From, To) \ -KEEP_NODE_MAP(From, To) - - -/// @} - -#endif