lemon/bits/clearable_graph_extender.h
author deba
Mon, 21 Nov 2005 18:12:11 +0000
changeset 1824 3a15b39a7c78
parent 1435 8e85e6bbefdf
child 1842 8abf74160dc4
permissions -rw-r--r--
Erasing old header
Correcting makefile
     1 // -*- c++ -*-
     2 
     3 #ifndef LEMON_CLEARABLE_GRAPH_EXTENDER_H
     4 #define LEMON_CLEARABLE_GRAPH_EXTENDER_H
     5 
     6 #include <lemon/invalid.h>
     7 
     8 
     9 namespace lemon {
    10 
    11   template <typename _Base> 
    12   class ClearableGraphExtender : public _Base {
    13   public:
    14 
    15     typedef ClearableGraphExtender Graph;
    16     typedef _Base Parent;
    17     typedef typename Parent::Node Node;
    18     typedef typename Parent::Edge Edge;
    19 
    20     void clear() {
    21       Parent::getNotifier(Node()).clear();
    22       Parent::getNotifier(Edge()).clear();
    23       Parent::clear();
    24     }
    25 
    26   };
    27 
    28   template <typename _Base> 
    29   class ClearableUndirGraphExtender : public _Base {
    30   public:
    31 
    32     typedef ClearableUndirGraphExtender Graph;
    33     typedef _Base Parent;
    34     typedef typename Parent::Node Node;
    35     typedef typename Parent::UndirEdge UndirEdge;
    36     typedef typename Parent::Edge Edge;
    37 
    38     void clear() {
    39       Parent::getNotifier(Node()).clear();
    40       Parent::getNotifier(UndirEdge()).clear();
    41       Parent::getNotifier(Edge()).clear();
    42       Parent::clear();
    43     }
    44 
    45   };
    46 
    47 
    48   template <typename _Base>
    49   class ClearableUndirBipartiteGraphExtender : public _Base {
    50   public:
    51 
    52     typedef _Base Parent;
    53     typedef ClearableUndirBipartiteGraphExtender Graph;
    54 
    55     typedef typename Parent::Node Node;
    56     typedef typename Parent::LowerNode LowerNode;
    57     typedef typename Parent::UpperNode UpperNode;
    58     typedef typename Parent::Edge Edge;
    59     typedef typename Parent::UndirEdge UndirEdge;
    60 
    61     void clear() {
    62       Parent::getNotifier(Edge()).clear();
    63       Parent::getNotifier(UndirEdge()).clear();
    64       Parent::getNotifier(Node()).clear();
    65       Parent::getNotifier(LowerNode()).clear();
    66       Parent::getNotifier(UpperNode()).clear();
    67       Parent::clear();
    68     }
    69 
    70   };
    71 
    72 }
    73 
    74 #endif