60 virtual const char* exceptionName() const { |
60 virtual const char* exceptionName() const { |
61 return "lemon::StaticMap::UnsupportedOperation"; |
61 return "lemon::StaticMap::UnsupportedOperation"; |
62 } |
62 } |
63 }; |
63 }; |
64 |
64 |
65 typedef True AdaptibleTag; |
65 private: |
66 |
66 |
|
67 typedef std::vector<_Value> Container; |
|
68 |
|
69 public: |
|
70 |
67 /// The graph type of the map. |
71 /// The graph type of the map. |
68 typedef _Graph Graph; |
72 typedef _Graph Graph; |
|
73 /// The reference map tag. |
|
74 typedef True ReferenceMapTag; |
|
75 |
69 /// The key type of the map. |
76 /// The key type of the map. |
70 typedef _Item Key; |
77 typedef _Item Key; |
71 /// The id map type of the map. |
|
72 typedef AlterationNotifier<_Item> Registry; |
|
73 /// The value type of the map. |
78 /// The value type of the map. |
74 typedef _Value Value; |
79 typedef _Value Value; |
|
80 /// The const reference type of the map. |
|
81 typedef typename Container::const_reference ConstReference; |
|
82 /// The reference type of the map. |
|
83 typedef typename Container::reference Reference; |
|
84 |
|
85 typedef const Value ConstValue; |
|
86 typedef Value* Pointer; |
|
87 typedef const Value* ConstPointer; |
|
88 |
|
89 typedef AlterationNotifier<_Item> Registry; |
75 |
90 |
76 /// The map type. |
91 /// The map type. |
77 typedef StaticMap Map; |
92 typedef StaticMap Map; |
78 /// The base class of the map. |
93 /// The base class of the map. |
79 typedef typename Registry::ObserverBase Parent; |
94 typedef typename Registry::ObserverBase Parent; |
80 |
|
81 private: |
|
82 |
|
83 typedef std::vector<Value> Container; |
|
84 |
|
85 public: |
|
86 |
95 |
87 /// \brief Constructor to attach the new map into the registry. |
96 /// \brief Constructor to attach the new map into the registry. |
88 /// |
97 /// |
89 /// It constructs a map and attachs it into the registry. |
98 /// It constructs a map and attachs it into the registry. |
90 /// It adds all the items of the graph to the map. |
99 /// It adds all the items of the graph to the map. |
138 const Graph* getGraph() const { |
147 const Graph* getGraph() const { |
139 return graph; |
148 return graph; |
140 } |
149 } |
141 |
150 |
142 public: |
151 public: |
143 |
|
144 typedef typename Container::reference Reference; |
|
145 typedef typename Container::pointer Pointer; |
|
146 typedef const Value ConstValue; |
|
147 typedef typename Container::const_reference ConstReference; |
|
148 typedef typename Container::const_pointer ConstPointer; |
|
149 |
152 |
150 /// \brief The subcript operator. |
153 /// \brief The subcript operator. |
151 /// |
154 /// |
152 /// The subscript operator. The map can be subscripted by the |
155 /// The subscript operator. The map can be subscripted by the |
153 /// actual items of the graph. |
156 /// actual items of the graph. |