[Lemon-commits] [lemon_svn] deba: r1076 - in hugo/trunk/src: hugo test work/deba

Lemon SVN svn at lemon.cs.elte.hu
Mon Nov 6 20:43:07 CET 2006


Author: deba
Date: Thu Sep  2 12:54:26 2004
New Revision: 1076

Modified:
   hugo/trunk/src/hugo/array_map_factory.h
   hugo/trunk/src/hugo/map_registry.h
   hugo/trunk/src/test/graph_test.cc
   hugo/trunk/src/work/deba/map_defines.h

Log:


Modified: hugo/trunk/src/hugo/array_map_factory.h
==============================================================================
--- hugo/trunk/src/hugo/array_map_factory.h	(original)
+++ hugo/trunk/src/hugo/array_map_factory.h	Thu Sep  2 12:54:26 2004
@@ -24,6 +24,7 @@
       public:
 
       typedef V Value;
+      typedef V ValueType;
       typedef A Allocator;
 
 	
@@ -56,7 +57,7 @@
       }
 
       template <typename CMap> Map(const CMap& copy) 
-	: capacity(0), values(0), MapBase(copy) {
+	: MapBase(copy), capacity(0), values(0) {
 	if (MapBase::getGraph()) {
 	  allocate_memory();
 	  for (KeyIt it(*MapBase::getGraph()); it != INVALID; ++it) {

Modified: hugo/trunk/src/hugo/map_registry.h
==============================================================================
--- hugo/trunk/src/hugo/map_registry.h	(original)
+++ hugo/trunk/src/hugo/map_registry.h	Thu Sep  2 12:54:26 2004
@@ -56,7 +56,7 @@
        * Copy constructor to register into the registry.
       */	
 	
-      MapBase(const MapBase& copy) : registry(0), graph(copy.graph) {
+      MapBase(const MapBase& copy) : graph(copy.graph), registry(0) {
 	if (copy.registry) {
 	  copy.registry->attach(*this);
 	}
@@ -74,6 +74,7 @@
 	if (copy.registry) {
 	  copy.registry->attach(*this);
 	}
+	return *this;
       }
 	
 
@@ -232,7 +233,7 @@
     /**
      * Notify all the registered maps about a Key added.
      */
-    virtual void add(Key& key) {
+    void add(Key& key) {
       typename Container::iterator it;
       for (it = container.begin(); it != container.end(); ++it) {
 	(*it)->add(key);
@@ -242,7 +243,7 @@
     /**
      * Notify all the registered maps about a Key erased.
      */ 
-    virtual void erase(Key& key) {
+    void erase(Key& key) {
       typename Container::iterator it;
       for (it = container.begin(); it != container.end(); ++it) {
 	(*it)->erase(key);
@@ -252,7 +253,7 @@
     /**
      * Notify all the registered maps about the map should be cleared.
      */ 
-    virtual void clear() {
+    void clear() {
       typename Container::iterator it;
       for (it = container.begin(); it != container.end(); ++it) {
 	(*it)->clear();

Modified: hugo/trunk/src/test/graph_test.cc
==============================================================================
--- hugo/trunk/src/test/graph_test.cc	(original)
+++ hugo/trunk/src/test/graph_test.cc	Thu Sep  2 12:54:26 2004
@@ -320,6 +320,7 @@
 
 //Compile SmartGraph
 template void checkCompile<SmartGraph>(SmartGraph &);
+
 //Compile SymSmartGraph
 template void checkCompile<SymSmartGraph>(SymSmartGraph &);
 
@@ -328,6 +329,7 @@
 template void checkCompileErase<ListGraph>(ListGraph &);
 template void checkCompileFindEdge<ListGraph>(ListGraph &);
 
+
 //Compile SymListGraph
 template void checkCompile<SymListGraph>(SymListGraph &);
 template void checkCompileErase<SymListGraph>(SymListGraph &);

Modified: hugo/trunk/src/work/deba/map_defines.h
==============================================================================
--- hugo/trunk/src/work/deba/map_defines.h	(original)
+++ hugo/trunk/src/work/deba/map_defines.h	Thu Sep  2 12:54:26 2004
@@ -61,7 +61,7 @@
   return *this; \
 } \
 template <typename CMap>NodeMap& operator=(const CMap& copy) { \
-  this->Factory::Map<V>::operator=<CMap>(copy); \
+  this->Factory::Map<V>::operator=<CMap>(static_cast<Factory::Map<V>&>(copy));\
   return *this; \
 } \
 };
@@ -87,7 +87,7 @@
   return *this; \
 } \
 template <typename CMap>EdgeMap& operator=(const CMap& copy) { \
-  this->Factory::Map<V>::operator=<CMap>(copy); \
+  this->Factory::Map<V>::operator=<CMap>(static_cast<Factory::Map<V>&>(copy));\
   return *this; \
 } \
 };



More information about the Lemon-commits mailing list