Simple Virtual Machine A simple but flexible virtual machine

Functions
SVM boolean values
SVM 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] | svm | The SVM pointer passed as first argument of the callback function.
  [in] | boolean | The boolean value to extract from.

Returns
  The raw boolean contained in the value.

Exceptions

  FAILURE | interruption when a parameter is incorrect. (Please refer to the main description page of this API.)
  FAILURE | interruption 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] | svm | The SVM pointer passed as first argument of the callback function.
  [in] | boolean | The boolean to initiate the boolean value.

Returns
  The boolean value.

Exceptions

  FAILURE | interruption 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] | svm | The SVM pointer passed as first argument of the callback function.
  [in] | boolean | The boolean to initiate the boolean value.

Returns
  The boolean value.

Exceptions

  FAILURE | interruption 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] | svm | The SVM pointer passed as first argument of the callback function.

Returns
  A non initialised boolean value.

Exceptions

  FAILURE | interruption 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] | svm | The SVM pointer passed as first argument of the callback function.
  [in,out] | value | The boolean value to update.
  [in] | boolean | The new boolean value.

Exceptions

  FAILURE | interruption when a parameter is incorrect. (Please refer to the main description page of this API.)
  FAILURE | interruption when the boolean parameter does not contain an boolean.
  FAILURE | interruption 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] | svm | The SVM pointer passed as first argument of the callback function.
  [in] | value | The boolean value to update.
  [in] | boolean | The new boolean value.

Exceptions

  FAILURE | interruption when a parameter is incorrect. (Please refer to the main description page of this API.)
  FAILURE | interruption when the value parameter does not contain an boolean.
  FAILURE | interruption 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] | svm | The SVM pointer passed as first argument of the callback function.
  [in] | value | The value to be diagnosed.

Returns
  TRUE if the value contains a boolean, FALSE otherwise.

Exceptions

  FAILURE | interruption when a parameter is incorrect. (Please refer to the main description page of this API.)