Utility functions for loading algorithm modules More...
#include <Inventor/algorithms/SoAlgorithms.h>
Classes | |
struct | Module |
Basic structure to store the information about a loaded module. | |
Public Member Functions | |
SoAlgorithms () | |
virtual | ~SoAlgorithms () |
virtual SoBufferObject * | createBufferObject () |
virtual SoDeviceContext * | createContext () |
virtual SoDataExtract * | createDataExtractInterface () |
virtual SoSeismic * | createSeismicInterface () |
virtual SoConversion * | createConversionInterface () |
virtual SoConvolution * | createConvolutionInterface () |
virtual SoArithmetic * | createArithmeticInterface () |
Static Public Member Functions | |
static void | init () |
static bool | isInitialized () |
static void | finish () |
static SoAlgorithms * | loadAlgorithmsModule (const SbString &moduleFileName) |
static SbBool | unloadAlgorithmsModule (const SbString &moduleFileName) |
This class provides convenience methods for loading an algorithm module, extracting specific algorithm interfaces and creating appropriate context and buffer objects for the device that implements the algorithms.
Examples:
SoAlgorithms::SoAlgorithms | ( | ) |
Algorithms interface constructor.
virtual SoAlgorithms::~SoAlgorithms | ( | ) | [virtual] |
Algorithms interface destructor.
virtual SoArithmetic* SoAlgorithms::createArithmeticInterface | ( | ) | [virtual] |
Returns an instance of the SoArithmetic interface defined in the loaded module.
If there is no loaded module it returns the default CPU version.
virtual SoBufferObject* SoAlgorithms::createBufferObject | ( | ) | [virtual] |
Returns an instance of a SoBufferObject according to the hardware used by the loaded module.
If there is no loaded module this function returns an SoCpuBufferObject.
virtual SoDeviceContext* SoAlgorithms::createContext | ( | ) | [virtual] |
Returns a DeviceContext that can be used with the algorithms module and SoBufferObject returned by the createBufferObject function.
virtual SoConversion* SoAlgorithms::createConversionInterface | ( | ) | [virtual] |
Returns an instance of the SoConversion interface defined in the loaded module.
If there is no loaded module it returns the default CPU version.
virtual SoConvolution* SoAlgorithms::createConvolutionInterface | ( | ) | [virtual] |
Returns an instance of the SoConvolution interface defined in the loaded module.
If there is no loaded module it returns the default CPU version.
virtual SoDataExtract* SoAlgorithms::createDataExtractInterface | ( | ) | [virtual] |
Returns an instance of the SoDataExtract interface defined in the loaded module.
If there is no loaded module it returns the default CPU version.
virtual SoSeismic* SoAlgorithms::createSeismicInterface | ( | ) | [virtual] |
static void SoAlgorithms::finish | ( | ) | [static] |
Static finish function to free the memory allocated by the algorithms module.
static void SoAlgorithms::init | ( | ) | [static] |
Static init function to initialize the algorithms module.
static bool SoAlgorithms::isInitialized | ( | ) | [static] |
Returns TRUE if module is currently initialized.
static SoAlgorithms* SoAlgorithms::loadAlgorithmsModule | ( | const SbString & | moduleFileName | ) | [static] |
Loads a module and returns an instance of the implementation of SoAlgorithms in this module.
If the module is already loaded this function just increments the reference count and returns a new instance of the algorithms interface.
moduleFileName | The module filename. See the description of this class for more information. |
Unloads a module.
The module is unloaded only if it is not used anymore, it uses a references counter in order to figure out if the module can be unloaded or not.
moduleFileName | The module filename to unload. |