| 59 | |
| 60 | |
| 61 | bool Option::nameValid(const std::string& name, bool reportError) |
| 62 | { |
| 63 | bool valid = (parse(name, 0) == name.size()); |
| 64 | if (!valid && reportError) |
| 65 | { |
| 66 | std::ostringstream oss; |
| 67 | oss << "Invalid option name '" << name << "'. Options must " |
| 68 | "consist of only lowercase letters, numbers and '_'."; |
| 69 | Utils::printError(oss.str()); |
| 70 | } |
| 71 | return valid; |
| 72 | } |
| 73 | |
| 74 | |
| 75 | //--------------------------------------------------------------------------- |
nothing calls this directly
no test coverage detected