diff -r 80eefca04b1e -r 59768817442a mapstorage.h --- a/mapstorage.h Thu Aug 18 13:33:49 2005 +0000 +++ b/mapstorage.h Tue Aug 23 07:36:09 2005 +0000 @@ -37,6 +37,12 @@ //Stores the default values for the different visualization edge attributes std::vector > default_edgemaps; + // Default values for the maps + std::map< std::string, double > nodemap_default; + + // Default values for the maps + std::map< std::string, double > edgemap_default; + public: ///Constructor of MapStorage. Expects the Graph of ///which maps will be stored in it. @@ -52,13 +58,13 @@ ///\param name is the name of map ///\nodemap is the pointer of the given nodemap ///\todo map should be given by reference! - int addNodeMap(const std::string &,Graph::NodeMap *); + int addNodeMap(const std::string &,Graph::NodeMap *, double); ///Adds given map to storage. A name and the map itself has to be provided. ///\param name is the name of map ///\edgemap is the pointer of the given edgemap ///\todo map should be given by reference! - int addEdgeMap(const std::string &,Graph::EdgeMap *); + int addEdgeMap(const std::string &,Graph::EdgeMap *, double); ///Returns how much nodemaps is stored in \ref MapStorage int numOfNodeMaps() {return nodemap_storage.size();}; @@ -94,13 +100,7 @@ ///To be able to iterate through each maps this function returns an iterator pointing to the last edgemap in the storage. std::map< std::string,Graph::EdgeMap * >::iterator endOfEdgeMaps(){return edgemap_storage.end();}; - ///This function sets a default base value for the newly created node - void initMapsForNode(NodeIt); - - ///This function sets a default base value for the newly created node - void initMapsForEdge(Graph::Edge); - - void readFromFile(const std::string &); + int readFromFile(const std::string &); void writeToFile(const std::string &); void clear();