Simple Virtual Machine
A simple but flexible virtual machine
SVM boolean values

This module contains API functions to handle SVM boolean values. More...

Functions

SVM_FUNCTION SVM_Value_Boolean svm_value_boolean_new (const void *svm, const SVM_Boolean boolean)
 This function creates a boolean value the SVM can store in its memories from a raw boolean. More...
 
SVM_FUNCTION SVM_Value_Boolean svm_value_boolean_new__raw (const void *svm, const int boolean)
 This function creates a boolean value the SVM can store in its memories from a C boolean. More...
 
SVM_FUNCTION SVM_Value_Boolean svm_value_boolean_new_null (const void *svm)
 This function creates a boolean value the SVM can store in its memories without a value. More...
 
SVM_FUNCTION SVM_Boolean svm_value_type_is_boolean (const void *svm, const SVM_Value value)
 This function checks whether a value contains a boolean. More...
 
SVM_FUNCTION SVM_Boolean svm_value_boolean_get (const void *svm, const SVM_Value_Boolean boolean)
 This function extracts the SVM_Boolean contained in a boolean value. More...
 
SVM_FUNCTION void svm_value_boolean_set (const void *svm, SVM_Value_Boolean value, const SVM_Boolean boolean)
 This function replaces the raw boolean contained in a boolean value from a SVM_Boolean. More...
 
SVM_FUNCTION void svm_value_boolean_set__raw (const void *svm, SVM_Value_Boolean value, const int boolean)
 This function replaces the raw boolean contained in a boolean value from a C boolean. More...
 

Detailed Description

This module contains API functions to handle SVM boolean values.

Function Documentation

◆ svm_value_boolean_get()

SVM_FUNCTION SVM_Boolean svm_value_boolean_get ( const void *  svm,
const SVM_Value_Boolean  boolean 
)

This function extracts the SVM_Boolean contained in a boolean value.

Parameters
[in]svmThe SVM pointer passed as first argument of the callback function.
[in]booleanThe boolean value to extract from.
Returns
The raw boolean contained in the value.
Exceptions
FAILUREinterruption when a parameter is incorrect. (Please refer to the main description page of this API.)
FAILUREinterruption when the boolean parameter does not contain an boolean.
See also
svm_value_type_is_boolean
svm_value_type_get

◆ svm_value_boolean_new()

SVM_FUNCTION SVM_Value_Boolean svm_value_boolean_new ( const void *  svm,
const SVM_Boolean  boolean 
)

This function creates a boolean value the SVM can store in its memories from a raw boolean.

Parameters
[in]svmThe SVM pointer passed as first argument of the callback function.
[in]booleanThe boolean to initiate the boolean value.
Returns
The boolean value.
Exceptions
FAILUREinterruption when a parameter is incorrect. (Please refer to the main description page of this API.)

◆ svm_value_boolean_new__raw()

SVM_FUNCTION SVM_Value_Boolean svm_value_boolean_new__raw ( const void *  svm,
const int  boolean 
)

This function creates a boolean value the SVM can store in its memories from a C boolean.

Parameters
[in]svmThe SVM pointer passed as first argument of the callback function.
[in]booleanThe boolean to initiate the boolean value.
Returns
The boolean value.
Exceptions
FAILUREinterruption when a parameter is incorrect. (Please refer to the main description page of this API.)

◆ svm_value_boolean_new_null()

SVM_FUNCTION SVM_Value_Boolean svm_value_boolean_new_null ( const void *  svm)

This function creates a boolean value the SVM can store in its memories without a value.

Parameters
[in]svmThe SVM pointer passed as first argument of the callback function.
Returns
A non initialised boolean value.
Exceptions
FAILUREinterruption when a parameter is incorrect. (Please refer to the main description page of this API.)

◆ svm_value_boolean_set()

SVM_FUNCTION void svm_value_boolean_set ( const void *  svm,
SVM_Value_Boolean  value,
const SVM_Boolean  boolean 
)

This function replaces the raw boolean contained in a boolean value from a SVM_Boolean.

Parameters
[in]svmThe SVM pointer passed as first argument of the callback function.
[in,out]valueThe boolean value to update.
[in]booleanThe new boolean value.
Exceptions
FAILUREinterruption when a parameter is incorrect. (Please refer to the main description page of this API.)
FAILUREinterruption when the boolean parameter does not contain an boolean.
FAILUREinterruption when the value is a constant.
See also
svm_value_type_is_boolean
svm_value_type_get

◆ svm_value_boolean_set__raw()

SVM_FUNCTION void svm_value_boolean_set__raw ( const void *  svm,
SVM_Value_Boolean  value,
const int  boolean 
)

This function replaces the raw boolean contained in a boolean value from a C boolean.

Parameters
[in]svmThe SVM pointer passed as first argument of the callback function.
[in]valueThe boolean value to update.
[in]booleanThe new boolean value.
Exceptions
FAILUREinterruption when a parameter is incorrect. (Please refer to the main description page of this API.)
FAILUREinterruption when the value parameter does not contain an boolean.
FAILUREinterruption when the value is a constant.
See also
svm_value_type_is_boolean
svm_value_type_get

◆ svm_value_type_is_boolean()

SVM_FUNCTION SVM_Boolean svm_value_type_is_boolean ( const void *  svm,
const SVM_Value  value 
)

This function checks whether a value contains a boolean.

Parameters
[in]svmThe SVM pointer passed as first argument of the callback function.
[in]valueThe value to be diagnosed.
Returns
TRUE if the value contains a boolean, FALSE otherwise.
Exceptions
FAILUREinterruption when a parameter is incorrect. (Please refer to the main description page of this API.)