nuXmv API 126f6942
API for nuXmv
Loading...
Searching...
No Matches
Macros | Functions
Environment

Functions for working environment. More...

Macros

#define NUXMV_VALID_ENV(env)   ((env).repr != NULL)
 Valid environment.
 

Functions

nuxmv_env nuxmv_create_env (void)
 Create a new environment.
 
nuxmv_status_code nuxmv_destroy_env (nuxmv_env env)
 Destroy an environment.
 
const char * nuxmv_env_get_last_error_message (nuxmv_env env)
 Get the last error message and clear it.
 
nuxmv_status_code nuxmv_env_set_options (nuxmv_env env, const nuxmv_opt *opts, size_t opt_num)
 Set a list of options for the environment.
 
int nuxmv_env_get_option_num (nuxmv_env env)
 Get the number of options for the environment.
 
nuxmv_opt nuxmv_env_get_option (nuxmv_env env, int opt_idx)
 Get an option of the environment.
 

Detailed Description

Functions for working environment.


Macro Definition Documentation

◆ NUXMV_VALID_ENV

#define NUXMV_VALID_ENV (   env)    ((env).repr != NULL)

Valid environment.

This macro checks whether env is a valid nuxmv_env.

Parameters
[in]envThe environment to inspect.
Returns
true if the option is valid, false otherwise.

Function Documentation

◆ nuxmv_create_env()

nuxmv_env nuxmv_create_env ( void  )

Create a new environment.

When no longer needed, the environment shall be freed using nuxmv_destroy_env().

Returns
The created environment. In case of error, NUXMV_VALID_ENV() evaluates to false.
See also

Requirements: 20.001

◆ nuxmv_destroy_env()

nuxmv_status_code nuxmv_destroy_env ( nuxmv_env  env)

Destroy an environment.

Destroying an environment will deallocate the memory of all the objects created inside it. It is an error to access an object created by an environment which has been destroyed (the precise behaviour is undefined).

Parameters
[in]envThe environment to destroy.
Returns
NUXMV_SUCCESS if the environment was destroyed, NUXMV_FAILURE in case of error.
See also

Requirements: 20.001

◆ nuxmv_env_get_last_error_message()

const char * nuxmv_env_get_last_error_message ( nuxmv_env  env)

Get the last error message and clear it.

Parameters
[in]envThe environment to inspect.
Returns
A null-terminated string, empty in case of no error, or NULL in case the function fails.
Note
Only last error message is recorded. A new call to this function should discard any previous error message pointer.
See also

Requirements: 20.003, 90.006.01

◆ nuxmv_env_get_option()

nuxmv_opt nuxmv_env_get_option ( nuxmv_env  env,
int  opt_idx 
)

Get an option of the environment.

Parameters
[in]envThe environment to inspect.
[in]opt_idxThe index of the option counting from 0.
Returns
The option of the environment. In case of error, NUXMV_VALID_OPT() evaluates to false.
See also

Requirements: 09.002

◆ nuxmv_env_get_option_num()

int nuxmv_env_get_option_num ( nuxmv_env  env)

Get the number of options for the environment.

Parameters
[in]envThe environment to inspect.
Returns
The number of options for the environment or -1 in case of error.
See also

Requirements: 09.002

◆ nuxmv_env_set_options()

nuxmv_status_code nuxmv_env_set_options ( nuxmv_env  env,
const nuxmv_opt opts,
size_t  opt_num 
)

Set a list of options for the environment.

Parameters
[in]envThe environment to modify.
[in]optsA list of options to set.
[in]opt_numThe number of options in the list.
Returns
NUXMV_SUCCESS if options were set, NUXMV_FAILURE in case of error.
See also

Requirements: 09.002