Changeset 1837:8dd6160ff699 in lemon-0.x for gui/mapstorage.cc
- Timestamp:
- 11/29/05 20:31:58 (18 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@2389
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gui/mapstorage.cc
r1708 r1837 17 17 nodemap_default["id"] = 1.0; 18 18 edgemap_default["id"] = 1.0; 19 20 active_nodemaps.resize(NODE_PROPERTY_NUM); 21 for(int i=0;i<NODE_PROPERTY_NUM;i++) 22 { 23 active_nodemaps[i]=""; 24 } 25 26 active_edgemaps.resize(EDGE_PROPERTY_NUM); 27 for(int i=0;i<EDGE_PROPERTY_NUM;i++) 28 { 29 active_edgemaps[i]=""; 30 } 19 31 } 20 32 … … 43 55 } 44 56 return 1; 57 } 58 59 void MapStorage::changeActiveMap(bool itisedge, int prop, std::string mapname) 60 { 61 if(itisedge) 62 { 63 active_edgemaps[prop]=mapname; 64 } 65 else 66 { 67 active_nodemaps[prop]=mapname; 68 } 69 signal_prop.emit(itisedge, prop); 70 } 71 72 std::string MapStorage::getActiveEdgeMap(int prop) 73 { 74 return active_edgemaps[prop]; 75 } 76 77 std::string MapStorage::getActiveNodeMap(int prop) 78 { 79 return active_nodemaps[prop]; 80 } 81 82 std::vector<std::string> MapStorage::getEdgeMapList() 83 { 84 std::vector<std::string> eml; 85 eml.resize(edgemap_storage.size()); 86 int i=0; 87 std::map< std::string,Graph::EdgeMap<double> * >::iterator emsi=beginOfEdgeMaps(); 88 for(;emsi!=endOfEdgeMaps();emsi++) 89 { 90 eml[i]=(emsi->first); 91 i++; 92 } 93 return eml; 94 } 95 96 std::vector<std::string> MapStorage::getNodeMapList() 97 { 98 std::vector<std::string> nml; 99 nml.resize(nodemap_storage.size()); 100 int i=0; 101 std::map< std::string,Graph::NodeMap<double> * >::iterator nmsi=beginOfNodeMaps(); 102 for(;nmsi!=endOfNodeMaps();nmsi++) 103 { 104 nml[i]=(nmsi->first); 105 i++; 106 } 107 return nml; 108 } 109 110 MapStorage::Signal_Prop MapStorage::signal_prop_ch() 111 { 112 return signal_prop; 45 113 } 46 114
Note: See TracChangeset
for help on using the changeset viewer.