Programming Guide
Getting Started
The HOOPS Data Provider Framework is a part of the HOOPS Solve, Access & Mesh distribution and can be found in the DataProviderFramework folder. The data provider framework is provided as source code so you can compile with your favorite compiler and settings.
To compile the framework, for example plugins and example apps, we recommend using CMake. Download CMake from https://cmake.org/download/.
To build and run the examples, please follow the steps below:
- Unzip the “HOOPS Access” distribution file info a folder
- Go to the DataProviderFramework folder in the distribution.
- Create a build folder (e.g. Build on the same level as DataProvider)
- > cd Build
- > cmake ../DataProvider
On Linux/mac, build the solution with:
> make
On Windows, open the project file and build with the selected compiler (e.g. Visual Studio).
The build step will build:
- DataProviderHostLib
- MinimalPlugin
- TestDriver
To run the test driver:
cd ExampleApps/TestDriver/
./TestDriver ../../ExamplePlugins/MinimalPlugin/cdp_MinimalPlugin MINIMAL
Creating a DataProviderPlugin
There are three steps to creating a DataProviderPlugin
Step 1: Create the plugin
The main file defines the plugin. You define a version and a method for creating the Factory. One file can contain many
data providers. The initializeDataProviderPlugin()
method is called by the host to initialize the
provider(s).
Example: MinimalPlugin.cpp
Step 2: Create the data provider factory
The factory is responsible for instantiation and deletion of the DataProvider, providing information about the provider
and checking if the provided ModelKey is supported by the provider. To create the factory, derive from
CDPDataProviderFactory
and implement the 4 pure virtual methods.
Example: MinimalProviderFactory.h/cpp
Step 3: Create the data provider
The provider is where all the CAE data is communicated to the host. To create a provider, derive from
CDPDataProvider
and implement the 7 pure virtual methods.
Example: MinimalProvider.h/cpp
Using Data Providers in HOOPS Access
Data providers can be used with HOOPS Access using a PluginLib object. The PluginManager module facilitates loading operations of plugin that will be used with the PluginLib object.