* Return the filename for an external file containing , made from * the original . */
| 67 | * the original <filename>. |
| 68 | */ |
| 69 | std::string GetExternalBlockFileName(const std::string&& filename, const std::string& blockname) |
| 70 | { |
| 71 | size_t lastDotPos = filename.find_last_of('.'); |
| 72 | if (lastDotPos != std::string::npos) |
| 73 | { |
| 74 | // <FileStem>_<BlockName>.<extension> |
| 75 | const std::string rawName = filename.substr(0, lastDotPos); |
| 76 | const std::string extension = filename.substr(lastDotPos); |
| 77 | return rawName + "_" + blockname + extension; |
| 78 | } |
| 79 | // <FileName>_<BlockName>.vtkhdf |
| 80 | return filename + "_" + blockname + ".vtkhdf"; |
| 81 | } |
| 82 | } |
| 83 | |
| 84 | //------------------------------------------------------------------------------ |
no outgoing calls
no test coverage detected