| 182 | } |
| 183 | |
| 184 | AbstractOcTree* AbstractOcTree::createTree(const std::string class_name, double res){ |
| 185 | std::map<std::string, AbstractOcTree*>::iterator it = classIDMapping().find(class_name); |
| 186 | if (it == classIDMapping().end()){ |
| 187 | OCTOMAP_ERROR("Could not create octree of type %s, not in store in classIDMapping\n", class_name.c_str()); |
| 188 | return NULL; |
| 189 | } else { |
| 190 | AbstractOcTree* tree = it->second->create(); |
| 191 | |
| 192 | tree->setResolution(res); |
| 193 | return tree; |
| 194 | } |
| 195 | } |
| 196 | |
| 197 | std::map<std::string, AbstractOcTree*>& AbstractOcTree::classIDMapping(){ |
| 198 | // we will "leak" the memory of the map and all trees until program exits, |
nothing calls this directly
no test coverage detected