Struct crfsuite_sys::tag_crfsuite_params [] [src]

#[repr(C)]
pub struct tag_crfsuite_params { pub internal: *mut c_void, pub nref: c_int, pub addref: Option<unsafe extern "C" fn(_: *mut crfsuite_params_t) -> c_int>, pub release: Option<unsafe extern "C" fn(_: *mut crfsuite_params_t) -> c_int>, pub num: Option<unsafe extern "C" fn(_: *mut crfsuite_params_t) -> c_int>, pub name: Option<unsafe extern "C" fn(_: *mut crfsuite_params_t, _: c_int, _: *mut *mut c_char) -> c_int>, pub set: Option<unsafe extern "C" fn(_: *mut crfsuite_params_t, _: *const c_char, _: *const c_char) -> c_int>, pub get: Option<unsafe extern "C" fn(_: *mut crfsuite_params_t, _: *const c_char, _: *mut *mut c_char) -> c_int>, pub set_int: Option<unsafe extern "C" fn(_: *mut crfsuite_params_t, _: *const c_char, _: c_int) -> c_int>, pub set_float: Option<unsafe extern "C" fn(_: *mut crfsuite_params_t, _: *const c_char, _: floatval_t) -> c_int>, pub set_string: Option<unsafe extern "C" fn(_: *mut crfsuite_params_t, _: *const c_char, _: *const c_char) -> c_int>, pub get_int: Option<unsafe extern "C" fn(_: *mut crfsuite_params_t, _: *const c_char, _: *mut c_int) -> c_int>, pub get_float: Option<unsafe extern "C" fn(_: *mut crfsuite_params_t, _: *const c_char, _: *mut floatval_t) -> c_int>, pub get_string: Option<unsafe extern "C" fn(_: *mut crfsuite_params_t, _: *const c_char, _: *mut *mut c_char) -> c_int>, pub help: Option<unsafe extern "C" fn(_: *mut crfsuite_params_t, _: *const c_char, _: *mut *mut c_char, _: *mut *mut c_char) -> c_int>, pub free: Option<unsafe extern "C" fn(_: *mut crfsuite_params_t, _: *const c_char)>, }

CRFSuite parameter interface.

Fields

Pointer to the instance data (internal use only).

Reference counter (internal use only).

Increment the reference counter. @param params The pointer to this parameter instance. @return int The reference count after this increment.

Decrement the reference counter. @param params The pointer to this parameter instance. @return int The reference count after this operation.

Obtain the number of available parameters. @param params The pointer to this parameter instance. @return int The number of parameters maintained by this object.

Obtain the name of a parameter. @param params The pointer to this parameter instance. @param i The parameter index. @param ptr_name *ptr_name points to the parameter name. @return int \c 0 always.

Set a parameter value. @param params The pointer to this parameter instance. @param name The parameter name. @param value The parameter value in string format. @return int \c 0 if the parameter is found, \c -1 otherwise.

Get a parameter value. @param params The pointer to this parameter instance. @param name The parameter name. @param ptr_value *ptr_value presents the parameter value in string format. @return int \c 0 if the parameter is found, \c -1 otherwise.

Set an integer value of a parameter. @param params The pointer to this parameter instance. @param name The parameter name. @param value The parameter value. @return int \c 0 if the parameter value is set successfully, \c -1 otherwise (unknown parameter or incompatible type).

Set a float value of a parameter. @param params The pointer to this parameter instance. @param name The parameter name. @param value The parameter value. @return int \c 0 if the parameter value is set successfully, \c -1 otherwise (unknown parameter or incompatible type).

Set a string value of a parameter. @param params The pointer to this parameter instance. @param name The parameter name. @param value The parameter value. @return int \c 0 if the parameter value is set successfully, \c -1 otherwise (unknown parameter or incompatible type).

Get an integer value of a parameter. @param params The pointer to this parameter instance. @param name The parameter name. @param ptr_value The pointer to a variable that receives the integer value. @return int \c 0 if the parameter value is obtained successfully, \c -1 otherwise (unknown parameter or incompatible type).

Get a float value of a parameter. @param params The pointer to this parameter instance. @param name The parameter name. @param ptr_value The pointer to a variable that receives the float value. @return int \c 0 if the parameter value is obtained successfully, \c -1 otherwise (unknown parameter or incompatible type).

Get a string value of a parameter. @param params The pointer to this parameter instance. @param name The parameter name. @param ptr_value *ptr_value presents the parameter value. @return int \c 0 if the parameter value is obtained successfully, \c -1 otherwise (unknown parameter or incompatible type).

Get the help message of a parameter. @param params The pointer to this parameter instance. @param name The parameter name. @param ptr_type The pointer to \c char* to which this function store the type of the parameter. @param ptr_help The pointer to \c char* to which this function store the help message of the parameter. @return int \c 0 if the parameter is found, \c -1 otherwise.

Free the memory block of a string allocated by this object. @param params The pointer to this parameter instance. @param str The pointer to the string.

Trait Implementations

impl Debug for tag_crfsuite_params
[src]

[src]

Formats the value using the given formatter.

impl Copy for tag_crfsuite_params
[src]

impl Clone for tag_crfsuite_params
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more