map_value_map.cc
author Peter Hegyi <hegyi@tmit.bme.hu>
Mon, 07 Jul 2008 08:10:39 -0500
changeset 1 67188bd752db
permissions -rw-r--r--
SVN revision 3500 made compilable with Lemon 1.0.
hegyi@1
     1
#include "map_value_map.h"
hegyi@1
     2
#include "mapstorage.h"
hegyi@1
     3
hegyi@1
     4
MapValueArcMap::MapValueArcMap(const std::string& _mapName, MapStorage* _pMapStorage) :
hegyi@1
     5
  mapName(_mapName),
hegyi@1
     6
  pMapStorage(_pMapStorage)
hegyi@1
     7
{
hegyi@1
     8
}
hegyi@1
     9
hegyi@1
    10
MapValueArcMap::Value MapValueArcMap::operator[](Key k) const {
hegyi@1
    11
  return pMapStorage->get(mapName, k);
hegyi@1
    12
}
hegyi@1
    13
hegyi@1
    14
void MapValueArcMap::set(Key k, Value v)
hegyi@1
    15
{
hegyi@1
    16
  pMapStorage->set(mapName, k, v);
hegyi@1
    17
}
hegyi@1
    18
hegyi@1
    19
MapValueNodeMap::MapValueNodeMap(const std::string& _mapName, MapStorage* _pMapStorage) :
hegyi@1
    20
  mapName(_mapName),
hegyi@1
    21
  pMapStorage(_pMapStorage)
hegyi@1
    22
{
hegyi@1
    23
}
hegyi@1
    24
hegyi@1
    25
MapValueNodeMap::Value MapValueNodeMap::operator[](Key k) const {
hegyi@1
    26
  return pMapStorage->get(mapName, k);
hegyi@1
    27
}
hegyi@1
    28
hegyi@1
    29
void MapValueNodeMap::set(Key k, Value v)
hegyi@1
    30
{
hegyi@1
    31
  pMapStorage->set(mapName, k, v);
hegyi@1
    32
}