| 38 | " --help Display the complete list of command-line options\n"; |
| 39 | |
| 40 | template <class T> void parseToken(std::string token, std::string type, T& res) |
| 41 | { |
| 42 | if (token.empty()) |
| 43 | { |
| 44 | return; |
| 45 | } |
| 46 | |
| 47 | mx::ValuePtr value = mx::Value::createValueFromStrings(token, type); |
| 48 | if (!value) |
| 49 | { |
| 50 | std::cout << "Unable to parse token " << token << " as type " << type << std::endl; |
| 51 | return; |
| 52 | } |
| 53 | |
| 54 | res = value->asA<T>(); |
| 55 | } |
| 56 | |
| 57 | } // anonymous namespace |
| 58 |
no test coverage detected