------------------------------------------------------------------------------
| 1219 | |
| 1220 | //------------------------------------------------------------------------------ |
| 1221 | std::string vtkHDFWriter::Implementation::GetBasePath(const std::string& fullPath) |
| 1222 | { |
| 1223 | auto removePrefix = [](std::string& path, const std::string& suffix) |
| 1224 | { |
| 1225 | if (path.find(suffix) != std::string::npos) |
| 1226 | { |
| 1227 | path = path.substr(0, path.find(suffix) - 1); |
| 1228 | } |
| 1229 | }; |
| 1230 | |
| 1231 | std::string basePath = fullPath; |
| 1232 | for (const std::string& suffix : PATH::PRIMITIVE_TYPES) |
| 1233 | { |
| 1234 | removePrefix(basePath, suffix); |
| 1235 | } |
| 1236 | |
| 1237 | for (const std::string& suffix : |
| 1238 | { PATH::STEPS, PATH::CELL_DATA, PATH::POINT_DATA, PATH::FIELD_DATA }) |
| 1239 | { |
| 1240 | removePrefix(basePath, suffix); |
| 1241 | } |
| 1242 | return basePath; |
| 1243 | } |
| 1244 | |
| 1245 | //------------------------------------------------------------------------------ |
| 1246 | char vtkHDFWriter::Implementation::GetPrimitive(hid_t group) |
no test coverage detected