| 139 | } |
| 140 | |
| 141 | static void RegisterSet(const std::string& strInput) |
| 142 | { |
| 143 | // separate NAME:VALUE in string |
| 144 | size_t pos = strInput.find(':'); |
| 145 | if ((pos == std::string::npos) || |
| 146 | (pos == 0) || |
| 147 | (pos == (strInput.size() - 1))) |
| 148 | throw std::runtime_error("Register input requires NAME:VALUE"); |
| 149 | |
| 150 | std::string key = strInput.substr(0, pos); |
| 151 | std::string valStr = strInput.substr(pos + 1, std::string::npos); |
| 152 | |
| 153 | RegisterSetJson(key, valStr); |
| 154 | } |
| 155 | |
| 156 | static void RegisterLoad(const std::string& strInput) |
| 157 | { |
no test coverage detected