COIN-OR::LEMON - Graph Library

Changeset 1989:d276e88aa48a in lemon-0.x for lemon/traits.h


Ignore:
Timestamp:
03/01/06 11:04:47 (18 years ago)
Author:
Balazs Dezso
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@2591
Message:

Traits for alteration notifiers
SplitGraph? is temporarly deleted

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lemon/traits.h

    r1979 r1989  
    3030  class ItemSetTraits {};
    3131 
     32
     33  template <typename Graph, typename Enable = void>
     34  struct NodeNotifierIndicator {
     35    typedef InvalidType Type;
     36  };
     37  template <typename Graph>
     38  struct NodeNotifierIndicator<
     39    Graph,
     40    typename enable_if<typename Graph::NodeNotifier::Notifier, void>::type
     41  > {
     42    typedef typename Graph::NodeNotifier Type;
     43  };
     44
    3245  template <typename _Graph>
    3346  class ItemSetTraits<_Graph, typename _Graph::Node> {
     
    3952    typedef typename Graph::NodeIt ItemIt;
    4053
     54    typedef typename NodeNotifierIndicator<Graph>::Type ItemNotifier;
     55
    4156    template <typename _Value>
    4257    class Map : public Graph::template NodeMap<_Value> {
     
    4863      Map(const Graph& _graph, const Value& _value)
    4964        : Parent(_graph, _value) {}
    50     };
    51 
     65
     66     };
     67
     68  };
     69
     70  template <typename Graph, typename Enable = void>
     71  struct EdgeNotifierIndicator {
     72    typedef InvalidType Type;
     73  };
     74  template <typename Graph>
     75  struct EdgeNotifierIndicator<
     76    Graph,
     77    typename enable_if<typename Graph::EdgeNotifier::Notifier, void>::type
     78  > {
     79    typedef typename Graph::EdgeNotifier Type;
    5280  };
    5381
     
    6189    typedef typename Graph::EdgeIt ItemIt;
    6290
     91    typedef typename EdgeNotifierIndicator<Graph>::Type ItemNotifier;
     92
    6393    template <typename _Value>
    6494    class Map : public Graph::template EdgeMap<_Value> {
     
    72102    };
    73103
     104  };
     105
     106  template <typename Graph, typename Enable = void>
     107  struct UEdgeNotifierIndicator {
     108    typedef InvalidType Type;
     109  };
     110  template <typename Graph>
     111  struct UEdgeNotifierIndicator<
     112    Graph,
     113    typename enable_if<typename Graph::UEdgeNotifier::Notifier, void>::type
     114  > {
     115    typedef typename Graph::UEdgeNotifier Type;
    74116  };
    75117
     
    83125    typedef typename Graph::UEdgeIt ItemIt;
    84126
     127    typedef typename UEdgeNotifierIndicator<Graph>::Type ItemNotifier;
     128
    85129    template <typename _Value>
    86130    class Map : public Graph::template UEdgeMap<_Value> {
     
    96140  };
    97141
     142  template <typename Graph, typename Enable = void>
     143  struct ANodeNotifierIndicator {
     144    typedef InvalidType Type;
     145  };
     146  template <typename Graph>
     147  struct ANodeNotifierIndicator<
     148    Graph,
     149    typename enable_if<typename Graph::ANodeNotifier::Notifier, void>::type
     150  > {
     151    typedef typename Graph::ANodeNotifier Type;
     152  };
    98153
    99154  template <typename _Graph>
     
    106161    typedef typename Graph::ANodeIt ItemIt;
    107162
     163    typedef typename ANodeNotifierIndicator<Graph>::Type ItemNotifier;
     164
    108165    template <typename _Value>
    109166    class Map : public Graph::template ANodeMap<_Value> {
     
    117174    };
    118175
     176  };
     177
     178  template <typename Graph, typename Enable = void>
     179  struct BNodeNotifierIndicator {
     180    typedef InvalidType Type;
     181  };
     182  template <typename Graph>
     183  struct BNodeNotifierIndicator<
     184    Graph,
     185    typename enable_if<typename Graph::BNodeNotifier::Notifier, void>::type
     186  > {
     187    typedef typename Graph::BNodeNotifier Type;
    119188  };
    120189
     
    127196    typedef typename Graph::BNode Item;
    128197    typedef typename Graph::BNodeIt ItemIt;
     198
     199    typedef typename BNodeNotifierIndicator<Graph>::Type ItemNotifier;
    129200
    130201    template <typename _Value>
Note: See TracChangeset for help on using the changeset viewer.