Changeset 595:e10b5e9419ef in lemon-0.x for src/work/deba/map_registry.h
- Timestamp:
- 05/10/04 15:49:35 (21 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@775
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/work/deba/map_registry.h
r571 r595 3 3 4 4 #include <vector> 5 6 using namespace std; 5 7 6 8 … … 63 65 map.registry = this; 64 66 map.registry_index = container.size()-1; 65 map.init();66 67 } 67 68 68 void detach(Map& map_base) { 69 map_base.destroy(); 70 container.back()->registry_index = map_base.registry_index; 71 container[map_base.registry_index] = container.back(); 69 void detach(Map& map) { 70 container.back()->registry_index = map.registry_index; 71 container[map.registry_index] = container.back(); 72 72 container.pop_back(); 73 map _base.registry = 0;74 map _base.graph = 0;73 map.registry = 0; 74 map.graph = 0; 75 75 } 76 76 77 77 78 v oid add(Key& key) {78 virtual void add(Key& key) { 79 79 typename Container::iterator it; 80 80 for (it = container.begin(); it != container.end(); ++it) { … … 83 83 } 84 84 85 v oid erase(Key& key) {85 virtual void erase(Key& key) { 86 86 typename Container::iterator it; 87 87 for (it = container.begin(); it != container.end(); ++it) {
Note: See TracChangeset
for help on using the changeset viewer.