| 169 | } |
| 170 | |
| 171 | int OSArgument::valueAsInteger() const { |
| 172 | if (!hasValue()) { |
| 173 | LOG_AND_THROW("This argument does not have a value set.") |
| 174 | } |
| 175 | if (type() != OSArgumentType::Integer) { |
| 176 | LOG_AND_THROW("This argument is of type " << type().valueName() << ", not of type Integer."); |
| 177 | } |
| 178 | |
| 179 | return std::get<int>(m_value); |
| 180 | } |
| 181 | |
| 182 | std::string OSArgument::valueAsString() const { |
| 183 | if (!hasValue()) { |