COIN-OR::LEMON - Graph Library

Changeset 595:e10b5e9419ef in lemon-0.x for src/work/deba/map_registry.h


Ignore:
Timestamp:
05/10/04 15:49:35 (20 years ago)
Author:
Balazs Dezso
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@775
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/work/deba/map_registry.h

    r571 r595  
    33
    44#include <vector>
     5
     6using namespace std;
    57
    68
     
    6365                        map.registry = this;
    6466                        map.registry_index = container.size()-1;
    65                         map.init();
    6667                }
    6768       
    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();
    7272                        container.pop_back();
    73                         map_base.registry = 0;
    74                         map_base.graph = 0;
     73                        map.registry = 0;
     74                        map.graph = 0;
    7575                }
    7676       
    7777               
    78                 void add(Key& key) {
     78                virtual void add(Key& key) {
    7979                        typename Container::iterator it;
    8080                        for (it = container.begin(); it != container.end(); ++it) {
     
    8383                }       
    8484               
    85                 void erase(Key& key) {
     85                virtual void erase(Key& key) {
    8686                        typename Container::iterator it;
    8787                        for (it = container.begin(); it != container.end(); ++it) {
Note: See TracChangeset for help on using the changeset viewer.