Simple Virtual Machine A simple but flexible virtual machine

Loading...
Searching...
No Matches
Functions
SVM interruption values
SVM values

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

## Functions
SVM_FUNCTION SVM_Value_Interruption | svm_value_interruption_new_internal (const void *svm, const SVM_Interruption_Internal interruption, const SVM_Value_String message, const SVM_Interruption_Kind kind)
| This function creates an interruption the SVM can store in its memories from an interruption type and a string value.
SVM_FUNCTION SVM_Value_Interruption | svm_value_interruption_new_internal__string (const void *svm, const SVM_Interruption_Internal interruption, const SVM_String message, const SVM_Interruption_Kind kind)
| This function creates an interruption the SVM can store in its memories from an interruption type and a SVM_String.
SVM_FUNCTION SVM_Value_Interruption | svm_value_interruption_new_internal__raw (const void *svm, const SVM_Interruption_Internal interruption, const char *message, const SVM_Interruption_Kind kind)
| This function creates an interruption the SVM can store in its memories from an interruption type and a C nul-terminated string.
SVM_FUNCTION SVM_Value_Interruption | svm_value_interruption_new_external (const void *svm, const SVM_Value_PluginEntryPoint name, const SVM_Value_String message)
| This function creates an interruption the SVM can store in its memories from a plugin entry point and a string value.
SVM_FUNCTION SVM_Value_Interruption | svm_value_interruption_new_external__string (const void *svm, const SVM_Value_PluginEntryPoint name, const SVM_String message)
| This function creates an interruption the SVM can store in its memories from a plugin entry point and a SVM_String.
SVM_FUNCTION SVM_Value_Interruption | svm_value_interruption_new_external__raw (const void *svm, const SVM_Value_PluginEntryPoint name, const char *message)
| This function creates an interruption the SVM can store in its memories from a plugin entry point and a C nul-terminated string.
SVM_FUNCTION SVM_Value_Interruption | svm_value_interruption_new_null (const void *svm)
| This function creates an interruption value the SVM can store in its memories without a value.
SVM_FUNCTION SVM_Boolean | svm_value_type_is_interruption (const void *svm, const SVM_Value value)
| This function checks whether a value contains an interruption.
SVM_FUNCTION SVM_Boolean | svm_value_interruption_is_internal (const void *svm, const SVM_Value_Interruption interruption)
| This function extracts the interruption type contained in an interruption value.
SVM_FUNCTION SVM_Boolean | svm_value_interruption_is_external (const void *svm, const SVM_Value_Interruption interruption)
| This function extracts the interruption extension name contained in an interruption value.
SVM_FUNCTION SVM_Interruption_Internal | svm_value_interruption_get_internal (const void *svm, const SVM_Value_Interruption interruption)
| This function extracts the interruption type contained in an interruption value.
SVM_FUNCTION SVM_Value_PluginEntryPoint | svm_value_interruption_get_external (const void *svm, const SVM_Value_Interruption interruption)
| This function extracts the interruption extension name contained in an interruption value.
SVM_FUNCTION SVM_String | svm_value_interruption_get_message (const void *svm, const SVM_Value_Interruption interruption)
| This function extracts the interruption message contained in an interruption value.
SVM_FUNCTION SVM_Interruption_Kind | svm_value_interruption_get_kind (const void *svm, const SVM_Value_Interruption interruption)
| This function extracts the interruption kind contained in an interruption value.
SVM_FUNCTION SVM_String | svm_value_interruption_get_location (const void *svm, const SVM_Value_Interruption interruption)
| This function extracts the interruption location contained in an interruption value.
SVM_FUNCTION void | svm_value_interruption_set (const void *svm, SVM_Value_Interruption value, const SVM_Value_Interruption interruption)
| This function replaces the interruption value by another interruption value.
SVM_FUNCTION void | svm_value_interruption_set_internal (const void *svm, SVM_Value_Interruption value, const SVM_Interruption_Internal type, const SVM_Value_String message, const SVM_Interruption_Kind kind)
| This function replaces the interruption type, the message and the kind of interruption contained in an interruption value from specific values and a string value message.
SVM_FUNCTION void | svm_value_interruption_set_internal__string (const void *svm, SVM_Value_Interruption value, const SVM_Interruption_Internal type, const SVM_String message, const SVM_Interruption_Kind kind)
| This function replaces the interruption type, the message and the kind of interruption contained in an interruption value from specific values and a SVM_String message.
SVM_FUNCTION void | svm_value_interruption_set_internal__raw (const void *svm, SVM_Value_Interruption value, const SVM_Interruption_Internal type, const char *message, const SVM_Interruption_Kind kind)
| This function replaces the interruption type, the message and the kind of interruption contained in an interruption value from specific values and a C nul-terminated string message.
SVM_FUNCTION void | svm_value_interruption_set_external (const void *svm, SVM_Value_Interruption value, const SVM_Value_PluginEntryPoint name, const SVM_Value_String message)
| This function replaces the interruption name and the message contained in an interruption value from specific values and a string value message.
SVM_FUNCTION void | svm_value_interruption_set_external__string (const void *svm, SVM_Value_Interruption value, const SVM_Value_PluginEntryPoint name, const SVM_String message)
| This function replaces the interruption name and the message contained in an interruption value from specific values and a SVM_String message.
SVM_FUNCTION void | svm_value_interruption_set_external__raw (const void *svm, SVM_Value_Interruption value, const SVM_Value_PluginEntryPoint name, const char *message)
| This function replaces the interruption name and the message contained in an interruption value from specific values and a C nul-terminated string message.

## Detailed Description

This module contains API functions to handle SVM interruption values.

## Function Documentation

## ◆ svm_value_interruption_get_external()

SVM_FUNCTION SVM_Value_PluginEntryPoint svm_value_interruption_get_external | ( | const void * | svm,
|  | const SVM_Value_Interruption | interruption
| ) |  |

This function extracts the interruption extension name contained in an interruption value.

Parameters

  [in] | svm | The SVM pointer passed as first argument of the callback function.
  [in] | interruption | The interruption value to extract from.

Returns
  The interruption extension name 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 interruption parameter does not contain an interruption.
  FAILURE | interruption when the interruption is internal.

See also
  svm_value_type_is_interruption
  svm_value_type_get

## ◆ svm_value_interruption_get_internal()

SVM_FUNCTION SVM_Interruption_Internal svm_value_interruption_get_internal | ( | const void * | svm,
|  | const SVM_Value_Interruption | interruption
| ) |  |

This function extracts the interruption type contained in an interruption value.

Parameters

  [in] | svm | The SVM pointer passed as first argument of the callback function.
  [in] | interruption | The interruption value to extract from.

Returns
  The interruption type 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 interruption parameter does not contain an interruption.
  FAILURE | interruption when the interruption is external.

See also
  svm_value_type_is_interruption
  svm_value_type_get

## ◆ svm_value_interruption_get_kind()

SVM_FUNCTION SVM_Interruption_Kind svm_value_interruption_get_kind | ( | const void * | svm,
|  | const SVM_Value_Interruption | interruption
| ) |  |

This function extracts the interruption kind contained in an interruption value.

Parameters

  [in] | svm | The SVM pointer passed as first argument of the callback function.
  [in] | interruption | The interruption value to extract from.

Returns
  The interruption kind 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 interruption parameter does not contain an interruption.

See also
  svm_value_type_is_interruption
  svm_value_type_get

## ◆ svm_value_interruption_get_location()

SVM_FUNCTION SVM_String svm_value_interruption_get_location | ( | const void * | svm,
|  | const SVM_Value_Interruption | interruption
| ) |  |

This function extracts the interruption location contained in an interruption value.

Parameters

  [in] | svm | The SVM pointer passed as first argument of the callback function.
  [in] | interruption | The interruption value to extract from.

Returns
  The interruption location as a string contained in the value.

Note
  When the interruption as no location, an empty string is returned.

Exceptions

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

See also
  svm_value_type_is_interruption
  svm_value_type_get

## ◆ svm_value_interruption_get_message()

SVM_FUNCTION SVM_String svm_value_interruption_get_message | ( | const void * | svm,
|  | const SVM_Value_Interruption | interruption
| ) |  |

This function extracts the interruption message contained in an interruption value.

Parameters

  [in] | svm | The SVM pointer passed as first argument of the callback function.
  [in] | interruption | The interruption value to extract from.

Returns
  The interruption message 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 interruption parameter does not contain an interruption.

See also
  svm_value_type_is_interruption
  svm_value_type_get

## ◆ svm_value_interruption_is_external()

SVM_FUNCTION SVM_Boolean svm_value_interruption_is_external | ( | const void * | svm,
|  | const SVM_Value_Interruption | interruption
| ) |  |

This function extracts the interruption extension name contained in an interruption value.

Parameters

  [in] | svm | The SVM pointer passed as first argument of the callback function.
  [in] | interruption | The interruption value to extract from.

Returns
  TRUE when the interruption is external, FALSE otherwise.

Exceptions

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

See also
  svm_value_type_is_interruption
  svm_value_type_get

## ◆ svm_value_interruption_is_internal()

SVM_FUNCTION SVM_Boolean svm_value_interruption_is_internal | ( | const void * | svm,
|  | const SVM_Value_Interruption | interruption
| ) |  |

This function extracts the interruption type contained in an interruption value.

Parameters

  [in] | svm | The SVM pointer passed as first argument of the callback function.
  [in] | interruption | The interruption value to extract from.

Returns
  TRUE when the interruption is internal, FALSE otherwise.

Exceptions

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

See also
  svm_value_type_is_interruption
  svm_value_type_get

## ◆ svm_value_interruption_new_external()

SVM_FUNCTION SVM_Value_Interruption svm_value_interruption_new_external | ( | const void * | svm,
|  | const SVM_Value_PluginEntryPoint | name,
|  | const SVM_Value_String | message
| ) |  |

This function creates an interruption the SVM can store in its memories from a plugin entry point and a string value.

Parameters

  [in] | svm | The SVM pointer passed as first argument of the callback function.
  [in] | name | The interruption extended type.
  [in] | message | A string for the SVM user.

The created interruption has a type defined in a plugin. The interruption type is automatically set to PLUGIN_INTERRUPTION.

Returns
  The interruption value.

Exceptions

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

## ◆ svm_value_interruption_new_external__raw()

SVM_FUNCTION SVM_Value_Interruption svm_value_interruption_new_external__raw | ( | const void * | svm,
|  | const SVM_Value_PluginEntryPoint | name,
|  | const char * | message
| ) |  |

This function creates an interruption the SVM can store in its memories from a plugin entry point and a C nul-terminated string.

Parameters

  [in] | svm | The SVM pointer passed as first argument of the callback function.
  [in] | name | The interruption extended type.
  [in] | message | A string for the SVM user.

The created interruption has a type defined in a plugin. The interruption type is automatically set to PLUGIN_INTERRUPTION.

Returns
  The interruption value.

Exceptions

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

## ◆ svm_value_interruption_new_external__string()

SVM_FUNCTION SVM_Value_Interruption svm_value_interruption_new_external__string | ( | const void * | svm,
|  | const SVM_Value_PluginEntryPoint | name,
|  | const SVM_String | message
| ) |  |

This function creates an interruption the SVM can store in its memories from a plugin entry point and a SVM_String.

Parameters

  [in] | svm | The SVM pointer passed as first argument of the callback function.
  [in] | name | The interruption extended type.
  [in] | message | A string for the SVM user.

The created interruption has a type defined in a plugin. The interruption type is automatically set to PLUGIN_INTERRUPTION.

Returns
  The interruption value.

Exceptions

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

## ◆ svm_value_interruption_new_internal()

SVM_FUNCTION SVM_Value_Interruption svm_value_interruption_new_internal | ( | const void * | svm,
|  | const SVM_Interruption_Internal | interruption,
|  | const SVM_Value_String | message,
|  | const SVM_Interruption_Kind | kind
| ) |  |

This function creates an interruption the SVM can store in its memories from an interruption type and a string value.

Parameters

  [in] | svm | The SVM pointer passed as first argument of the callback function.
  [in] | interruption | The interruption code.
  [in] | message | A string for the SVM user.
  [in] | kind | The interruption type.

The created interruption has an internal type and can be set as an hardware interruption.

Returns
  The interruption value.

Exceptions

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

## ◆ svm_value_interruption_new_internal__raw()

SVM_FUNCTION SVM_Value_Interruption svm_value_interruption_new_internal__raw | ( | const void * | svm,
|  | const SVM_Interruption_Internal | interruption,
|  | const char * | message,
|  | const SVM_Interruption_Kind | kind
| ) |  |

This function creates an interruption the SVM can store in its memories from an interruption type and a C nul-terminated string.

Parameters

  [in] | svm | The SVM pointer passed as first argument of the callback function.
  [in] | interruption | The interruption code.
  [in] | message | A string for the SVM user.
  [in] | kind | The interruption type.

The created interruption has an internal type and can be set as an hardware interruption.

Returns
  The interruption value.

Exceptions

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

## ◆ svm_value_interruption_new_internal__string()

SVM_FUNCTION SVM_Value_Interruption svm_value_interruption_new_internal__string | ( | const void * | svm,
|  | const SVM_Interruption_Internal | interruption,
|  | const SVM_String | message,
|  | const SVM_Interruption_Kind | kind
| ) |  |

This function creates an interruption the SVM can store in its memories from an interruption type and a SVM_String.

Parameters

  [in] | svm | The SVM pointer passed as first argument of the callback function.
  [in] | interruption | The interruption code.
  [in] | message | A string for the SVM user.
  [in] | kind | The interruption type.

The created interruption has an internal type and can be set as an hardware interruption.

Returns
  The interruption value.

Exceptions

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

## ◆ svm_value_interruption_new_null()

SVM_FUNCTION SVM_Value_Interruption svm_value_interruption_new_null | ( | const void * | svm | ) |

This function creates an interruption 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 interruption value.

Exceptions

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

## ◆ svm_value_interruption_set()

SVM_FUNCTION void svm_value_interruption_set | ( | const void * | svm,
|  | SVM_Value_Interruption | value,
|  | const SVM_Value_Interruption | interruption
| ) |  |

This function replaces the interruption value by another interruption value.

Parameters

  [in] | svm | The SVM pointer passed as first argument of the callback function.
  [in,out] | value | The interruption value to update.
  [in] | interruption | The interruption to use for update.

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 interruption.
  FAILURE | interruption when the interruption parameter does not contain an interruption.
  FAILURE | interruption when the value is a constant.

See also
  svm_value_type_is_interruption
  svm_value_type_get

## ◆ svm_value_interruption_set_external()

SVM_FUNCTION void svm_value_interruption_set_external | ( | const void * | svm,
|  | SVM_Value_Interruption | value,
|  | const SVM_Value_PluginEntryPoint | name,
|  | const SVM_Value_String | message
| ) |  |

This function replaces the interruption name and the message contained in an interruption value from specific values and a string value message.

Parameters

  [in] | svm | The SVM pointer passed as first argument of the callback function.
  [in,out] | value | The interruption value to update.
  [in] | name | The new interruption extension name.
  [in] | message | The new interruption message.

The interruption type is automatically set to PLUGIN_INTERRUPTION.

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 interruption.
  FAILURE | interruption when the name parameter does not identify a plugin interruption.
  FAILURE | interruption when the value is a constant.

See also
  svm_value_type_is_interruption
  svm_value_type_get

## ◆ svm_value_interruption_set_external__raw()

SVM_FUNCTION void svm_value_interruption_set_external__raw | ( | const void * | svm,
|  | SVM_Value_Interruption | value,
|  | const SVM_Value_PluginEntryPoint | name,
|  | const char * | message
| ) |  |

This function replaces the interruption name and the message contained in an interruption value from specific values and a C nul-terminated string message.

Parameters

  [in] | svm | The SVM pointer passed as first argument of the callback function.
  [in,out] | value | The interruption value to update.
  [in] | name | The new interruption extension name.
  [in] | message | The new interruption message.

The interruption type is automatically set to PLUGIN_INTERRUPTION.

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 interruption.
  FAILURE | interruption when the name parameter does not identify a plugin interruption.
  FAILURE | interruption when the value is a constant.

See also
  svm_value_type_is_interruption
  svm_value_type_get

## ◆ svm_value_interruption_set_external__string()

SVM_FUNCTION void svm_value_interruption_set_external__string | ( | const void * | svm,
|  | SVM_Value_Interruption | value,
|  | const SVM_Value_PluginEntryPoint | name,
|  | const SVM_String | message
| ) |  |

This function replaces the interruption name and the message contained in an interruption value from specific values and a SVM_String message.

Parameters

  [in] | svm | The SVM pointer passed as first argument of the callback function.
  [in,out] | value | The interruption value to update.
  [in] | name | The new interruption extension name.
  [in] | message | The new interruption message.

The interruption type is automatically set to PLUGIN_INTERRUPTION.

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 interruption.
  FAILURE | interruption when the name parameter does not identify a plugin interruption.
  FAILURE | interruption when the value is a constant.

See also
  svm_value_type_is_interruption
  svm_value_type_get

## ◆ svm_value_interruption_set_internal()

SVM_FUNCTION void svm_value_interruption_set_internal | ( | const void * | svm,
|  | SVM_Value_Interruption | value,
|  | const SVM_Interruption_Internal | type,
|  | const SVM_Value_String | message,
|  | const SVM_Interruption_Kind | kind
| ) |  |

This function replaces the interruption type, the message and the kind of interruption contained in an interruption value from specific values and a string value message.

Parameters

  [in] | svm | The SVM pointer passed as first argument of the callback function.
  [in,out] | value | The interruption value to update.
  [in] | type | The new interruption type.
  [in] | message | The new interruption message.
  [in] | kind | The new interruption kind.

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 interruption.
  FAILURE | interruption when the value is a constant.
  FAILURE | interruption when the interruption type is PLUGIN_INTERRUPTION.

See also
  svm_value_type_is_interruption
  svm_value_type_get

## ◆ svm_value_interruption_set_internal__raw()

SVM_FUNCTION void svm_value_interruption_set_internal__raw | ( | const void * | svm,
|  | SVM_Value_Interruption | value,
|  | const SVM_Interruption_Internal | type,
|  | const char * | message,
|  | const SVM_Interruption_Kind | kind
| ) |  |

This function replaces the interruption type, the message and the kind of interruption contained in an interruption value from specific values and a C nul-terminated string message.

Parameters

  [in] | svm | The SVM pointer passed as first argument of the callback function.
  [in,out] | value | The interruption value to update.
  [in] | type | The new interruption type.
  [in] | message | The new interruption message.
  [in] | kind | The new interruption kind.

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 interruption.
  FAILURE | interruption when the value is a constant.
  FAILURE | interruption when the interruption type is PLUGIN_INTERRUPTION.

See also
  svm_value_type_is_interruption
  svm_value_type_get

## ◆ svm_value_interruption_set_internal__string()

SVM_FUNCTION void svm_value_interruption_set_internal__string | ( | const void * | svm,
|  | SVM_Value_Interruption | value,
|  | const SVM_Interruption_Internal | type,
|  | const SVM_String | message,
|  | const SVM_Interruption_Kind | kind
| ) |  |

This function replaces the interruption type, the message and the kind of interruption contained in an interruption value from specific values and a SVM_String message.

Parameters

  [in] | svm | The SVM pointer passed as first argument of the callback function.
  [in,out] | value | The interruption value to update.
  [in] | type | The new interruption type.
  [in] | message | The new interruption message.
  [in] | kind | The new interruption kind.

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 interruption.
  FAILURE | interruption when the value is a constant.
  FAILURE | interruption when the interruption type is PLUGIN_INTERRUPTION.

See also
  svm_value_type_is_interruption
  svm_value_type_get

## ◆ svm_value_type_is_interruption()

SVM_FUNCTION SVM_Boolean svm_value_type_is_interruption | ( | const void * | svm,
|  | const SVM_Value | value
| ) |  |

This function checks whether a value contains an interruption.

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 an interruption, FALSE otherwise.

Exceptions

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