#[repr(C)]pub struct rsb_initopts {
pub keys: *mut rsb_opt_t,
pub values: *mut *mut c_void,
pub n_pairs: rsb_int_t,
pub action: rsb_int_t,
}Expand description
@brief A structure specifying library (initialization) options, to be used with the \ref rsb_lib_reinit() function. \n
The structure specifies, for \c i=0,..,n_pairs-1 , a list of (key,value) pairs, stored respectively as (\c keys[i],values[i]). \n Each flag specifies the type and possible range of values it accepts. \n The structure may he used to set or query various library parameters.
Example: \code const int max_io=10; // the number of different options we want to set struct rsb_initopts io={NULL,NULL,0,RSB_IO_SPECIFIER_SET}, iop=&io; // pointer to the options structure void * io_values[max_io]; // an array of pointers to max_io different option values (we shall set) enum rsb_opt_t io_keys[max_io]; // an array of max_io flag values specifying the type of values we are handing over to the library io.keys=io_keys; // io.keys will now point to io_keys as its keys array io.values=io_values; // io.values will now point to io_keys as its values array io.n_pairs=0; // we have 0 pairs specified so far io.keys[io.n_pairs]=RSB_IO_WANT_BOUNDED_BOX_COMPUTATION; // the first (at index 0) option we want to specify is RSB_IO_WANT_BOUNDED_BOX_COMPUTATION io.values[io.n_pairs]=1; // the value we want to set the RSB_IO_WANT_BOUNDED_BOX_COMPUTATION option to io.n_pairs++; // io.n_pairs is set to 1: we have one option set, so even if we have (max_io-io.n_pairs) left, only the first will be read … // we are free to specify other option (type, value) pairs \endcode
Fields§
§keys: *mut rsb_opt_tAn array of value types key flags.
values: *mut *mut c_voidAn array of value pointers, as specified by each flag value.
n_pairs: rsb_int_tThe length of the \c keys and \c values arrays.
action: rsb_int_tThe action we are requesting (either one of #RSB_IO_SPECIFIER_GET or #RSB_IO_SPECIFIER_SET)
Trait Implementations§
Source§impl Clone for rsb_initopts
impl Clone for rsb_initopts
Source§fn clone(&self) -> rsb_initopts
fn clone(&self) -> rsb_initopts
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more