| 89 | } |
| 90 | |
| 91 | bool Storage::checkGroupRead(const string& id) const |
| 92 | { |
| 93 | vector<string> tokens; |
| 94 | tokenizePath(id, tokens); |
| 95 | string grp = tokens[0]; |
| 96 | if (!hasGroup(grp)) { |
| 97 | throw CanteraError("Storage::checkGroupRead", |
| 98 | "No group with id '{}' found at root.", grp); |
| 99 | } |
| 100 | |
| 101 | string path = grp; |
| 102 | h5::Group sub = m_file->getGroup(grp); |
| 103 | tokens.erase(tokens.begin()); |
| 104 | for (auto& grp : tokens) { |
| 105 | if (!hasGroup(path + "/" + grp)) { |
| 106 | throw CanteraError("Storage::checkGroupRead", |
| 107 | "No group with id '{}' found at '{}'.", grp, path); |
| 108 | } |
| 109 | path += "/" + grp; |
| 110 | sub = sub.getGroup(grp); |
| 111 | } |
| 112 | return true; |
| 113 | } |
| 114 | |
| 115 | bool Storage::checkGroupWrite(const string& id, bool permissive) |
| 116 | { |
nothing calls this directly
no test coverage detected