Pointwise Plugin SDK
|
Customizes the typedef GRDP_RTITEM declaration. More...
Go to the source code of this file.
Macros | |
#define | GRDP_RUNTIME_INSTDATADECL MY_GRDP_DATA* data; |
Implementation defined runtime instance data macro. More... | |
Customizes the typedef GRDP_RTITEM declaration.
During import, it is often necessary to keep track of runtime, shared state information. To simplify the addition of this kind of data to a plugin without having to resort to global variables, or adding arguments to functions, a pointer to plugin defined data type is part of GRDP_RTITEM.
To add custom, per-instance data to the GRDP_RTITEM typedef, your plugin should define the struct MY_GRDP_DATA. For example, in runtimeReadGrid.cxx (for local use) or in a project header file (for shared use) you could define:
A pointer to this struct is accessed as pRti->data using the pRti parameter of runtimeReadGrid(GRDP_RTITEM *pRti). By default, pRti->data is set to null.
To use this pointer, a plugin needs to declare and initialize an instance of this struct and assign its address to this pointer. Once set, your plugin can access the MY_GRDP_DATA data members anywhere it has access to the pRti pointer.
An example is shown in the code below.
Definition in file rtGrdpInstanceData.h.
#define GRDP_RUNTIME_INSTDATADECL MY_GRDP_DATA* data; |
Implementation defined runtime instance data macro.
By default, this macro resolves to MY_GRDP_DATA* data;.
See rtGrdpInstanceData.h for more information.
Definition at line 22 of file rtGrdpInstanceData.h.