| 43 | } |
| 44 | |
| 45 | bool AbstractOcTree::write(const std::string& filename) const{ |
| 46 | std::ofstream file(filename.c_str(), std::ios_base::out | std::ios_base::binary); |
| 47 | |
| 48 | if (!file.is_open()){ |
| 49 | OCTOMAP_ERROR_STR("Filestream to "<< filename << " not open, nothing written."); |
| 50 | return false; |
| 51 | } else { |
| 52 | // TODO: check is_good of finished stream, return |
| 53 | write(file); |
| 54 | file.close(); |
| 55 | } |
| 56 | |
| 57 | return true; |
| 58 | } |
| 59 | |
| 60 | |
| 61 | bool AbstractOcTree::write(std::ostream &s) const{ |
no outgoing calls