Changeset 1989:d276e88aa48a in lemon-0.x for lemon/traits.h
- Timestamp:
- 03/01/06 11:04:47 (18 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@2591
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lemon/traits.h
r1979 r1989 30 30 class ItemSetTraits {}; 31 31 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 32 45 template <typename _Graph> 33 46 class ItemSetTraits<_Graph, typename _Graph::Node> { … … 39 52 typedef typename Graph::NodeIt ItemIt; 40 53 54 typedef typename NodeNotifierIndicator<Graph>::Type ItemNotifier; 55 41 56 template <typename _Value> 42 57 class Map : public Graph::template NodeMap<_Value> { … … 48 63 Map(const Graph& _graph, const Value& _value) 49 64 : 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; 52 80 }; 53 81 … … 61 89 typedef typename Graph::EdgeIt ItemIt; 62 90 91 typedef typename EdgeNotifierIndicator<Graph>::Type ItemNotifier; 92 63 93 template <typename _Value> 64 94 class Map : public Graph::template EdgeMap<_Value> { … … 72 102 }; 73 103 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; 74 116 }; 75 117 … … 83 125 typedef typename Graph::UEdgeIt ItemIt; 84 126 127 typedef typename UEdgeNotifierIndicator<Graph>::Type ItemNotifier; 128 85 129 template <typename _Value> 86 130 class Map : public Graph::template UEdgeMap<_Value> { … … 96 140 }; 97 141 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 }; 98 153 99 154 template <typename _Graph> … … 106 161 typedef typename Graph::ANodeIt ItemIt; 107 162 163 typedef typename ANodeNotifierIndicator<Graph>::Type ItemNotifier; 164 108 165 template <typename _Value> 109 166 class Map : public Graph::template ANodeMap<_Value> { … … 117 174 }; 118 175 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; 119 188 }; 120 189 … … 127 196 typedef typename Graph::BNode Item; 128 197 typedef typename Graph::BNodeIt ItemIt; 198 199 typedef typename BNodeNotifierIndicator<Graph>::Type ItemNotifier; 129 200 130 201 template <typename _Value>
Note: See TracChangeset
for help on using the changeset viewer.