Open Inventor Release 2023.2.3
 
Loading...
Searching...
No Matches
SoAlgorithms Class Reference

VSG extension Utility functions for loading algorithm modules More...

#include <Inventor/algorithms/SoAlgorithms.h>

Public Member Functions

 SoAlgorithms ()
 Algorithms interface constructor.
 
virtual ~SoAlgorithms ()
 Algorithms interface destructor.
 
virtual SoBufferObjectcreateBufferObject ()
 Returns an instance of a SoBufferObject according to the hardware used by the loaded module.
 
virtual SoDeviceContextcreateContext ()
 Returns a DeviceContext that can be used with the algorithms module and SoBufferObject returned by the createBufferObject function.
 
virtual SoDataExtractcreateDataExtractInterface ()
 Returns an instance of the SoDataExtract interface defined in the loaded module.
 
virtual SoSeismiccreateSeismicInterface ()
 Returns an instance of the SoSeismic interface defined in the loaded module.
 
virtual SoConversioncreateConversionInterface ()
 Returns an instance of the SoConversion interface defined in the loaded module.
 
virtual SoConvolutioncreateConvolutionInterface ()
 Returns an instance of the SoConvolution interface defined in the loaded module.
 
virtual SoArithmeticcreateArithmeticInterface ()
 Returns an instance of the SoArithmetic interface defined in the loaded module.
 

Static Public Member Functions

static void init ()
 Static init function to initialize the algorithms module.
 
static bool isInitialized ()
 Returns TRUE if module is currently initialized.
 
static void finish ()
 Static finish function to free the memory allocated by the algorithms module.
 
static SoAlgorithmsloadAlgorithmsModule (const SbString &moduleFileName)
 Loads a module and returns an instance of the implementation of SoAlgorithms in this module.
 
static SbBool unloadAlgorithmsModule (const SbString &moduleFileName)
 Unloads a module.
 

Detailed Description

VSG extension Utility functions for loading algorithm modules

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:

Definition at line 78 of file SoAlgorithms.h.

Constructor & Destructor Documentation

◆ SoAlgorithms()

SoAlgorithms::SoAlgorithms ( )

Algorithms interface constructor.

◆ ~SoAlgorithms()

virtual SoAlgorithms::~SoAlgorithms ( )
virtual

Algorithms interface destructor.

Member Function Documentation

◆ createArithmeticInterface()

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.

Returns
Instance of the SoArithmetic interface.

◆ createBufferObject()

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.

Returns
An Instance of a SoBufferObject.

◆ createContext()

virtual SoDeviceContext * SoAlgorithms::createContext ( )
virtual

Returns a DeviceContext that can be used with the algorithms module and SoBufferObject returned by the createBufferObject function.

Returns
An instance of an SoDeviceContext object.

◆ createConversionInterface()

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.

Returns
Instance of the SoConversion interface.

◆ createConvolutionInterface()

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.

Returns
Instance of the SoConvolution interface.

◆ createDataExtractInterface()

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.

Returns
Instance of the SoDataExtract interface.

◆ createSeismicInterface()

virtual SoSeismic * SoAlgorithms::createSeismicInterface ( )
virtual

Returns an instance of the SoSeismic interface defined in the loaded module.

If there is no loaded module it returns the default CPU version.

Returns
Instance of the SoSeismic interface.

◆ finish()

static void SoAlgorithms::finish ( )
static

Static finish function to free the memory allocated by the algorithms module.

◆ init()

static void SoAlgorithms::init ( )
static

Static init function to initialize the algorithms module.

◆ isInitialized()

static bool SoAlgorithms::isInitialized ( )
static

Returns TRUE if module is currently initialized.

◆ loadAlgorithmsModule()

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.

Parameters
moduleFileNameThe module filename. See the description of this class for more information.
Returns
An instance of the Algorithms interface from the module, or NULL if the module cannot be load.

◆ unloadAlgorithmsModule()

static SbBool SoAlgorithms::unloadAlgorithmsModule ( const SbString moduleFileName)
static

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.

Parameters
moduleFileNameThe module filename to unload.

The documentation for this class was generated from the following file: