Convert options to a string list appropriate for parsing with ProgramArgs. \return List of options as argument strings. */
| 161 | \return List of options as argument strings. |
| 162 | */ |
| 163 | StringList Options::toCommandLine() const |
| 164 | { |
| 165 | StringList s; |
| 166 | |
| 167 | for (const auto& op : m_options) |
| 168 | { |
| 169 | const Option& o = op.second; |
| 170 | s.push_back(o.toArg()); |
| 171 | } |
| 172 | return s; |
| 173 | } |
| 174 | |
| 175 | Options Options::fromFile(const std::string& filename, bool throwOnOpenError) |
| 176 | { |