Simple Virtual Machine A simple but flexible virtual machine

Loading...
Searching...
No Matches
Functions
SVM plugin configuration
SVM plugins

This module contains API functions to handle SVM plugin configuration. More...

## Functions
SVM_FUNCTION SVM_Boolean | svm_plugin_has_option (const void *svm, const SVM_Value_PluginEntryPoint option)
| This function checks whether an option exists.
SVM_FUNCTION SVM_Boolean | svm_plugin_has_argument (const void *svm, const SVM_Value_PluginEntryPoint argument)
| This function checks whether an argument exists.
SVM_FUNCTION SVM_Boolean | svm_plugin_has_arguments (const void *svm, const SVM_Value_PluginEntryPoint arguments)
| This function checks whether an extra argument array exists.
SVM_FUNCTION SVM_Value | svm_plugin_get_option (const void *svm, const SVM_Value_PluginEntryPoint option)
| This function returns the value associated to an option.
SVM_FUNCTION SVM_Value | svm_plugin_get_argument (const void *svm, const SVM_Value_PluginEntryPoint argument)
| This function returns the value associated to an argument.
SVM_FUNCTION SVM_Value * | svm_plugin_get_arguments (const void *svm, const SVM_Value_PluginEntryPoint arguments)
| This function returns the values array associated to an extra arguments array.

## Detailed Description

This module contains API functions to handle SVM plugin configuration.

These functions allow plugin code to check and retrieve values associated to the options and arguments passed at plugin invokation.

## Function Documentation

## ◆ svm_plugin_get_argument()

SVM_FUNCTION SVM_Value svm_plugin_get_argument | ( | const void * | svm,
|  | const SVM_Value_PluginEntryPoint | argument
| ) |  |

This function returns the value associated to an argument.

Parameters

  [in] | svm | The SVM pointer passed as first argument of the callback function.
  [in] | argument | The argument name of the value to retrieve.

Returns
  The value associated to the argument.

Note
  The value is constant and can have a type among integer and string.

Exceptions

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

See also
  svm_plugin_has_argument

## ◆ svm_plugin_get_arguments()

SVM_FUNCTION SVM_Value * svm_plugin_get_arguments | ( | const void * | svm,
|  | const SVM_Value_PluginEntryPoint | arguments
| ) |  |

This function returns the values array associated to an extra arguments array.

Parameters

  [in] | svm | The SVM pointer passed as first argument of the callback function.
  [in] | arguments | The extra arguments array name of the value to retrieve.

Returns
  The values array associated to the extra arguments array, terminated by a C null pointer.

Note
  The values are constant and can have a type among integer and string.

Exceptions

  FAILURE | interruption when a parameter is incorrect. (Please refer to the main description page of this API.)
  FAILURE | interruption when the extra arguments array does not exist.

See also
  svm_plugin_has_arguments

## ◆ svm_plugin_get_option()

SVM_FUNCTION SVM_Value svm_plugin_get_option | ( | const void * | svm,
|  | const SVM_Value_PluginEntryPoint | option
| ) |  |

This function returns the value associated to an option.

Parameters

  [in] | svm | The SVM pointer passed as first argument of the callback function.
  [in] | option | The option name of the value to retrieve.

Returns
  The value associated to the option.

Note
  The value is constant, can be null and can have a type among integer, string and boolean.

Exceptions

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

See also
  svm_plugin_has_option

## ◆ svm_plugin_has_argument()

SVM_FUNCTION SVM_Boolean svm_plugin_has_argument | ( | const void * | svm,
|  | const SVM_Value_PluginEntryPoint | argument
| ) |  |

This function checks whether an argument exists.

Parameters

  [in] | svm | The SVM pointer passed as first argument of the callback function.
  [in] | argument | The argument name to check.

Returns
  TRUE if the argument exists, FALSE otherwise.

Exceptions

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

## ◆ svm_plugin_has_arguments()

SVM_FUNCTION SVM_Boolean svm_plugin_has_arguments | ( | const void * | svm,
|  | const SVM_Value_PluginEntryPoint | arguments
| ) |  |

This function checks whether an extra argument array exists.

Parameters

  [in] | svm | The SVM pointer passed as first argument of the callback function.
  [in] | arguments | The extra argument array name to check.

Returns
  TRUE if the extra argument array exists, FALSE otherwise.

Exceptions

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

## ◆ svm_plugin_has_option()

SVM_FUNCTION SVM_Boolean svm_plugin_has_option | ( | const void * | svm,
|  | const SVM_Value_PluginEntryPoint | option
| ) |  |

This function checks whether an option exists.

Parameters

  [in] | svm | The SVM pointer passed as first argument of the callback function.
  [in] | option | The option name to check.

Returns
  TRUE if the option exists, FALSE otherwise.

Exceptions

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