equal
deleted
inserted
replaced
241 /// \brief The class represents the inverse of the map. |
241 /// \brief The class represents the inverse of the map. |
242 /// |
242 /// |
243 /// The class represents the inverse of the map. |
243 /// The class represents the inverse of the map. |
244 /// \see inverse() |
244 /// \see inverse() |
245 class InverseMap { |
245 class InverseMap { |
246 protected: |
246 public: |
|
247 /// \brief Constructor. |
|
248 /// |
|
249 /// Constructor for creating an id-to-item map. |
247 InverseMap(const Graph& _graph) : graph(&_graph) {} |
250 InverseMap(const Graph& _graph) : graph(&_graph) {} |
248 public: |
251 /// \brief Gives back the given item from its id. |
249 /// \brief Gives back the given item by its id. |
|
250 /// |
252 /// |
251 /// Gives back the given item by its id. |
253 /// Gives back the given item from its id. |
252 /// |
254 /// |
253 Item operator[](int id) const { return graph->fromId(id, Item());} |
255 Item operator[](int id) const { return graph->fromId(id, Item());} |
254 private: |
256 private: |
255 const Graph* graph; |
257 const Graph* graph; |
256 }; |
258 }; |