Back

APIVersion

The `APIVersion` component in the SOFA framework is used to specify the API version of the components utilized within a scene. This helps ensure compatibility and proper functionality by verifying that all components adhere to a consistent API level. The `getApiLevel()` method retrieves the specified API level, while the `init()` method initializes the component and checks for valid input data using the `checkInputData()` protected function. The component interacts with other SOFA components through inheritance from the `BaseObject` class. It ensures that the specified API version is one of the allowed values ('17.06', '17.12', etc.), providing warnings if an invalid or unspecified level is detected.

abstract
`APIVersion` specifies the API version of components used in a SOFA scene to ensure compatibility and proper functionality.
sheet
# APIVersion ## Overview The `APIVersion` component ensures that all components within a SOFA scene adhere to a consistent API level, thereby maintaining compatibility. It inherits from the `BaseObject` class. ## Parameters and Data - **ApiLevel**: Specifies the API version of the components used in the scene (e.g., '17.06', '17.12'). This parameter is crucial for ensuring that all components are compatible with each other.
description
The `APIVersion` component in the SOFA framework is used to specify the API version of the components utilized within a scene. This helps ensure compatibility and proper functionality by verifying that all components adhere to a consistent API level. The `getApiLevel()` method retrieves the specified API level, while the `init()` method initializes the component and checks for valid input data using the `checkInputData()` protected function. The component interacts with other SOFA components through inheritance from the `BaseObject` class. It ensures that the specified API version is one of the allowed values ('17.06', '17.12', etc.), providing warnings if an invalid or unspecified level is detected.
maths
The `APIVersion` component in the SOFA framework does not have any direct mathematical or physical descriptions as it is primarily used for ensuring compatibility and managing API versions within a scene. Its main function is to specify and validate the API level of components used in a simulation scenario. Specifically, this component provides methods to: - **Retrieve the specified API Level**: The method `getApiLevel()` returns the current API version as a string. - **Initialize and Validate Input Data**: The `init()` method initializes the component and calls `checkInputData()`, which ensures that the provided API level is one of the allowed versions ('17.06', '17.12', etc.). If an invalid or unspecified level is detected, it issues a warning. The `APIVersion` does not directly contribute to any mathematical models or physical simulations within SOFA but serves as a utility for ensuring consistency across components and scenes.
{
  "name": "APIVersion",
  "main": {
    "name": "APIVersion",
    "namespace": "sofa::component::sceneutility::_apiversion_",
    "module": "Sofa.Component.SceneUtility",
    "include": "sofa/component/sceneutility/APIVersion.h",
    "doc": "Specify the APIVersion of the component used in a scene.",
    "inherits": [
      "BaseObject"
    ],
    "templates": [],
    "data_fields": [],
    "links": [],
    "methods": [
      {
        "name": "getApiLevel",
        "return_type": "const int &",
        "params": [],
        "is_virtual": false,
        "is_pure_virtual": false,
        "is_static": false,
        "access": "public"
      },
      {
        "name": "init",
        "return_type": "void",
        "params": [],
        "is_virtual": true,
        "is_pure_virtual": false,
        "is_static": false,
        "access": "public"
      },
      {
        "name": "checkInputData",
        "return_type": "void",
        "params": [],
        "is_virtual": false,
        "is_pure_virtual": false,
        "is_static": false,
        "access": "protected"
      }
    ]
  },
  "desc": {
    "description": "The `APIVersion` component in the SOFA framework is used to specify the API version of the components utilized within a scene. This helps ensure compatibility and proper functionality by verifying that all components adhere to a consistent API level. The `getApiLevel()` method retrieves the specified API level, while the `init()` method initializes the component and checks for valid input data using the `checkInputData()` protected function.\n\nThe component interacts with other SOFA components through inheritance from the `BaseObject` class. It ensures that the specified API version is one of the allowed values ('17.06', '17.12', etc.), providing warnings if an invalid or unspecified level is detected."
  },
  "maths": {
    "maths": "The `APIVersion` component in the SOFA framework does not have any direct mathematical or physical descriptions as it is primarily used for ensuring compatibility and managing API versions within a scene. Its main function is to specify and validate the API level of components used in a simulation scenario.\n\nSpecifically, this component provides methods to:\n- **Retrieve the specified API Level**: The method `getApiLevel()` returns the current API version as a string.\n- **Initialize and Validate Input Data**: The `init()` method initializes the component and calls `checkInputData()`, which ensures that the provided API level is one of the allowed versions ('17.06', '17.12', etc.). If an invalid or unspecified level is detected, it issues a warning.\n\nThe `APIVersion` does not directly contribute to any mathematical models or physical simulations within SOFA but serves as a utility for ensuring consistency across components and scenes."
  },
  "summary": {
    "abstract": "`APIVersion` specifies the API version of components used in a SOFA scene to ensure compatibility and proper functionality.",
    "sheet": "# APIVersion\n\n## Overview\nThe `APIVersion` component ensures that all components within a SOFA scene adhere to a consistent API level, thereby maintaining compatibility. It inherits from the `BaseObject` class.\n\n## Parameters and Data\n- **ApiLevel**: Specifies the API version of the components used in the scene (e.g., '17.06', '17.12'). This parameter is crucial for ensuring that all components are compatible with each other."
  }
}