Changeset 786:d7b3b13b9df6 in lemon-0.x for src/hugo/sym_map_factory.h
- Timestamp:
- 09/02/04 17:21:13 (19 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1079
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/hugo/sym_map_factory.h
r782 r786 36 36 37 37 typedef typename MapRegistry::Graph Graph; 38 typedef typename MapRegistry::Key Key;38 typedef typename MapRegistry::KeyType KeyType; 39 39 typedef typename MapRegistry::KeyIt KeyIt; 40 40 … … 69 69 } 70 70 71 Value& operator[](const Key & key) {71 Value& operator[](const KeyType& key) { 72 72 int id = MapBase::getGraph()->id(key); 73 73 return MapImpl::operator[](id >> 1); 74 74 } 75 75 76 const Value& operator[](const Key & key) const {76 const Value& operator[](const KeyType& key) const { 77 77 int id = MapBase::getGraph()->id(key); 78 78 return MapImpl::operator[](id >> 1); 79 79 } 80 80 81 const Value& get(const Key & key) const {81 const Value& get(const KeyType& key) const { 82 82 int id = MapBase::getGraph()->id(key); 83 83 return MapImpl::operator[](id >> 1); 84 84 } 85 85 86 void set(const Key & key, const Value& val) {86 void set(const KeyType& key, const Value& val) { 87 87 int id = MapBase::getGraph()->id(key); 88 88 MapImpl::operator[](id >> 1) = val; 89 89 } 90 90 91 void add(const Key & key) {91 void add(const KeyType& key) { 92 92 int id = MapBase::getGraph()->id(key); 93 93 if (id & 1) return; … … 95 95 } 96 96 97 void erase(const Key & key) {97 void erase(const KeyType& key) { 98 98 int id = MapBase::getGraph()->id(key); 99 99 if (id & 1) return;
Note: See TracChangeset
for help on using the changeset viewer.