User manual

128
This operator is used to access option values by index. Reference to the string option
value with specified index is returned.
chapi_cfg_option_value_t class derivatives
All options can work with appropriate option values. Each option value type is wrapped by
dedicated C++ class. Note that it is not necessary to create option values manually they
are created during the option creation and accessed like the follows: opt[idx].
Integer option value is wrapped by C++ class chapi_integer_option_value_t derived from the
class chapi_cfg_option_value_t. The following public methods are defined:
chapi_integer_option_value_t(chapi_cfg_option_t *option, int opt_val_idx,
void *opt_buffer);
where
option - parent option for the value;
opt_val_idx - option value index among the all option values;
opt_buffer - option value buffer.
This constructor is used to initialize integer option value.
operator int ();
This operator converts integer option value to the int value.
bool set(int val);
where
val -
value to set for the option.
This method is used to set the new value for the option value.
Boolean option value is wrapped by C++ class chapi_bool_option_value_t derived from the
class chapi_cfg_option_value_t. The following public methods are defined:
chapi_bool_option_value_t(chapi_cfg_option_t *option, int opt_val_idx,
void *opt_buffer);
where
option - parent option for the value;