| 1107 | } |
| 1108 | |
| 1109 | void calculateNamespacePath(std::string_view urlString, |
| 1110 | std::string& fileString, |
| 1111 | std::vector<std::string_view>& namespacePath) |
| 1112 | { |
| 1113 | // If the url references a specific namespace within the file, |
| 1114 | // calculate the full namespace path to the final namespace. |
| 1115 | size_t loc = urlString.rfind('#'); |
| 1116 | if (loc != std::string::npos) |
| 1117 | { |
| 1118 | fileString = urlString.substr(0, loc); |
| 1119 | auto namespacePathString = urlString.substr(loc + 1); |
| 1120 | while ((loc = namespacePathString.find('/')) != std::string::npos) |
| 1121 | { |
| 1122 | namespacePath.emplace_back(namespacePathString.substr(0, loc)); |
| 1123 | namespacePathString = namespacePathString.substr(loc + 1); |
| 1124 | } |
| 1125 | namespacePath.emplace_back(namespacePathString); |
| 1126 | } |
| 1127 | else |
| 1128 | { |
| 1129 | fileString = urlString; |
| 1130 | } |
| 1131 | } |
| 1132 | |
| 1133 | Properties* getPropertiesFromNamespacePath(Properties* properties, const std::vector<std::string_view>& namespacePath) |
| 1134 | { |
no test coverage detected