c++ setting for emacs
authoralpar
Tue, 08 Jun 2004 06:44:05 +0000
changeset 6767ec5e7e6c7b4
parent 675 38755a4d4b51
child 677 af3b5c85a227
c++ setting for emacs
Empty commands for doxygen
src/work/deba/map_defines.h
src/work/deba/map_registry.h
src/work/deba/test_graph.h
     1.1 --- a/src/work/deba/map_defines.h	Fri Jun 04 16:05:20 2004 +0000
     1.2 +++ b/src/work/deba/map_defines.h	Tue Jun 08 06:44:05 2004 +0000
     1.3 @@ -1,3 +1,4 @@
     1.4 +// -*- c++ -*-
     1.5  #ifndef MAP_DEFINES_H
     1.6  #define MAP_DEFINES_H
     1.7  
     2.1 --- a/src/work/deba/map_registry.h	Fri Jun 04 16:05:20 2004 +0000
     2.2 +++ b/src/work/deba/map_registry.h	Tue Jun 08 06:44:05 2004 +0000
     2.3 @@ -5,15 +5,14 @@
     2.4  
     2.5  using namespace std;
     2.6  
     2.7 +namespace hugo {
     2.8 +
     2.9  /** 
    2.10      Registry class to register edge or node maps in the graph. The
    2.11      registry helps you to implement an observer pattern. If you add
    2.12      or erase an edge or node you must notify all the maps about the
    2.13      event.
    2.14  */
    2.15 -
    2.16 -namespace hugo {
    2.17 -
    2.18    template <typename G, typename K, typename KIt>
    2.19    class MapRegistry {
    2.20    public:
    2.21 @@ -23,6 +22,10 @@
    2.22  	
    2.23  
    2.24  
    2.25 +    ///. 
    2.26 +
    2.27 +    ///. 
    2.28 +    /// 
    2.29      class MapBase {
    2.30      public:
    2.31        typedef G Graph;
    2.32 @@ -137,10 +140,13 @@
    2.33  		
    2.34      public:
    2.35  	
    2.36 +    ///. 
    2.37      MapRegistry() {}
    2.38  	
    2.39 +    ///.
    2.40      MapRegistry(const MapRegistry&) {}
    2.41  		
    2.42 +    ///.
    2.43      MapRegistry& operator=(const MapRegistry&) {
    2.44        for (it = container.begin(); it != container.end(); ++it) {
    2.45  	(*it)->destroy();
    2.46 @@ -149,6 +155,7 @@
    2.47        }
    2.48      }
    2.49  				
    2.50 +    ///.
    2.51      ~MapRegistry() {
    2.52        typename Container::iterator it;
    2.53        for (it = container.begin(); it != container.end(); ++it) {
    2.54 @@ -161,6 +168,7 @@
    2.55  	
    2.56      public:
    2.57  	
    2.58 +    ///.
    2.59      void attach(MapBase& map) {
    2.60        if (map.registry) {
    2.61  	map.registry->detach(map);
    2.62 @@ -170,6 +178,7 @@
    2.63        map.registry_index = container.size()-1;
    2.64      } 
    2.65  	
    2.66 +    ///.
    2.67      void detach(MapBase& map) {
    2.68        container.back()->registry_index = map.registry_index; 
    2.69        container[map.registry_index] = container.back();
    2.70 @@ -179,6 +188,7 @@
    2.71      }
    2.72  	
    2.73  		
    2.74 +    ///. 
    2.75      virtual void add(Key& key) {
    2.76        typename Container::iterator it;
    2.77        for (it = container.begin(); it != container.end(); ++it) {
    2.78 @@ -186,6 +196,7 @@
    2.79        }
    2.80      }	
    2.81  		
    2.82 +    ///.
    2.83      virtual void erase(Key& key) {
    2.84        typename Container::iterator it;
    2.85        for (it = container.begin(); it != container.end(); ++it) {
     3.1 --- a/src/work/deba/test_graph.h	Fri Jun 04 16:05:20 2004 +0000
     3.2 +++ b/src/work/deba/test_graph.h	Tue Jun 08 06:44:05 2004 +0000
     3.3 @@ -34,17 +34,17 @@
     3.4      class SymEdgeIt;
     3.5      
     3.6      typedef ListGraph Graph;
     3.7 - 
     3.8 -    CREATE_MAP_REGISTRIES
     3.9 -    CREATE_MAPS(ArrayMapFactory)
    3.10 -
    3.11 +    
    3.12 +    CREATE_MAP_REGISTRIES;
    3.13 +    CREATE_MAPS(ArrayMapFactory);
    3.14 +    
    3.15    private:
    3.16 -
    3.17 +    
    3.18      int node_id;
    3.19      int edge_id;
    3.20      int _node_num;
    3.21      int _edge_num;
    3.22 -
    3.23 +    
    3.24      node_item* _first_node;
    3.25      node_item* _last_node;
    3.26