* Returns the pointer to the key option, * or throws an exception if it's not a key. * @return Pointer to the option. */
| 249 | * @return Pointer to the option. |
| 250 | */ |
| 251 | SDLKey *OptionInfo::asKey() const |
| 252 | { |
| 253 | if (_type != OPTION_KEY) |
| 254 | { |
| 255 | throw Exception(_id + " is not a key!"); |
| 256 | } |
| 257 | return _ref.k; |
| 258 | } |
| 259 | |
| 260 | /** |
| 261 | * Returns the pointer to the string option, |
no test coverage detected