----------------------------------------------------------------------------- Add an integer option. -----------------------------------------------------------------------------
| 227 | // Add an integer option. |
| 228 | //----------------------------------------------------------------------------- |
| 229 | bool Options::AddOptionInt |
| 230 | ( |
| 231 | string const& _name, |
| 232 | int32 const _value |
| 233 | ) |
| 234 | { |
| 235 | // get (or create) option |
| 236 | Option* option = AddOption( _name ); |
| 237 | |
| 238 | if (option == NULL) return false; |
| 239 | |
| 240 | // set unique option members |
| 241 | option->m_type = Options::OptionType_Int; |
| 242 | option->m_valueInt = _value; |
| 243 | |
| 244 | // save in m_options map |
| 245 | string lowerName = ToLower( _name ); |
| 246 | m_options[lowerName] = option; |
| 247 | return true; |
| 248 | } |
| 249 | |
| 250 | //----------------------------------------------------------------------------- |
| 251 | // <Options::AddOptionString> |