Pointwise Plugin SDK
Functions
+ Collaboration diagram for API Functions:

Functions

PWP_PROTOTYPE_DECL PWP_BOOL PwpActivateAPI (const char api[])
 Activates the plugin for a given API spec. More...
 
PWP_PROTOTYPE_DECL PWP_VOID PwpDestroy ()
 Called by framework just before plugin library is closed. More...
 
PWP_PROTOTYPE_DECL const char * PwpEnumAPIs (PWP_UINT32 ndx, PWP_APIINFO *pInfo)
 Enumerates the APIs supported by this plugin. More...
 
PWP_PROTOTYPE_DECL PWP_UINT32 PwpGetAPICount ()
 Get the number of APIs supported by this plugin. More...
 
PWP_PROTOTYPE_DECL PWP_MESSAGECB PwpGetMessageCallback (const char api[])
 Gets the current message callback. More...
 
PWP_PROTOTYPE_DECL PWP_VERSIONVAL PwpGetPluginInfo (PWP_PLUGININFO *pInfo)
 Get information about this plugin. More...
 
PWP_PROTOTYPE_DECL PWP_BOOL PwpGetValue (const char group[], const char key[], PWP_HVALUE value)
 Get the value for a grouped key. More...
 
PWP_PROTOTYPE_DECL PWP_BOOL PwpInitialize ()
 Initializes the plugin. More...
 
PWP_PROTOTYPE_DECL PWP_BOOL PwpIsLicensed (const char api[], const PWP_LICENSEDATA *pLicenseData)
 Determines if plugin api is licensed for use on this machine. More...
 
PWP_PROTOTYPE_DECL PWP_VOID PwpSetLanguage (const char language[])
 Sets the active language. More...
 
PWP_PROTOTYPE_DECL PWP_MESSAGECB PwpSetMessageCallback (const char api[], PWP_MESSAGECB msgCB)
 Sets the message callback function for the given api. More...
 

Detailed Description

Function Documentation

◆ PwpActivateAPI()

PWP_PROTOTYPE_DECL PWP_BOOL PwpActivateAPI ( const char  api[])

Activates the plugin for a given API spec.

An API will be activated by the framework before any API specific calls are made to the plugin.

Parameters
apiThe target api. Must be one of the values returned from PwpEnumAPIs().

Definition at line 59 of file apiPWP.cxx.

References PWP_FALSE, PWP_TRUE, and PwuFindPublishedAPI().

◆ PwpDestroy()

PWP_PROTOTYPE_DECL PWP_VOID PwpDestroy ( )

Called by framework just before plugin library is closed.

Definition at line 65 of file apiPWP.cxx.

◆ PwpEnumAPIs()

PWP_PROTOTYPE_DECL const char* PwpEnumAPIs ( PWP_UINT32  ndx,
PWP_APIINFO pInfo 
)

Enumerates the APIs supported by this plugin.

Parameters
ndxThe api index starting with 0.
pInfoPointer to the destination PWP_APIINFO buffer.
Returns
The API spec name (same as pInfo->name). NULL if ndx is not valid.
See also
PwpGetAPICount()
Sample usage:
PWP_APIINFO apiInfo;
PWP_UINT32 ndx = 0;
while (caep->PwpEnumAPIs(ndx++, &apiInfo)) {
printf ("api: '%s' v%lu.%lu\n",
apiInfo.name, apiInfo.ver.major, apiInfo.ver.minor);
}
// output:
// api: 'Exporter-CAE/1.0' v1.0

Definition at line 70 of file apiPWP.cxx.

References PWU_RTITEM::apiInfo, publishedApiCnt, and pwpRtItem.

◆ PwpGetAPICount()

PWP_PROTOTYPE_DECL PWP_UINT32 PwpGetAPICount ( )

Get the number of APIs supported by this plugin.

Returns
The number of published APIs.

Definition at line 80 of file apiPWP.cxx.

References publishedApiCnt.

◆ PwpGetMessageCallback()

PWP_PROTOTYPE_DECL PWP_MESSAGECB PwpGetMessageCallback ( const char  api[])

Gets the current message callback.

Parameters
apiThe target api. Must be one of the values returned from PwpEnumAPIs().
See also
PWP_MESSAGECB, PwpSetMessageCallback

Definition at line 86 of file apiPWP.cxx.

References PwuFindApiMsgCB().

◆ PwpGetPluginInfo()

PWP_PROTOTYPE_DECL PWP_VERSIONVAL PwpGetPluginInfo ( PWP_PLUGININFO pInfo)

◆ PwpGetValue()

PWP_PROTOTYPE_DECL PWP_BOOL PwpGetValue ( const char  group[],
const char  key[],
PWP_HVALUE  value 
)

Get the value for a grouped key.

The group can be set to NULL or empty for root-level, ungrouped keys.

Parameters
groupThe value's group (see Group Formatting).
keyThe value's name.
valueA value handle.
Note
Group Formatting
A group value is a chain of zero or more keys separated by a delimiter. A key can be any text value that does NOT contain a delimiter character. Leading and trailing white space characters are trimmed from a key before processing.

All groups beginning with the key "SDK" are reserved for use by the PluginSDK.

By default, the period '.' is used as the key delimiter. However, if the first character in a group is a period then the group's second character will be used as the group's delimiter.

Example groups:
// Group contains 8 keys
"this.is.a.group.using.the.default.delimiter"
// Group contains 5 keys including the "this.group" key
".|this.group|uses|a|vbar|delimiter"
// Group has no keys. This is the root or top-level group.
""
// Group contains 1 key.
"simple"
// An SDK reserved group containing 6 keys.
"SDK.is.a.reserved.PluginSDK.group"
See also
PWP_HVALUE, PWP_ENUM_VALTYPE, PwpValue_t

Definition at line 138 of file apiPWP.cxx.

References PWP_FALSE, PWP_HVALUE_ISVALID, and PwuGetValue().

◆ PwpInitialize()

PWP_PROTOTYPE_DECL PWP_BOOL PwpInitialize ( )

Initializes the plugin.

Called once and first by the framework immediately after the plugin library is opened.

Definition at line 52 of file apiPWP.cxx.

References PWP_TRUE.

◆ PwpIsLicensed()

PWP_PROTOTYPE_DECL PWP_BOOL PwpIsLicensed ( const char  api[],
const PWP_LICENSEDATA pLicenseData 
)

Determines if plugin api is licensed for use on this machine.

Parameters
apiThe target api. Must be one of the values returned from PwpEnumAPIs().
pLicenseDataPointer to the PWP_LICENSEDATA buffer.
Note
This call is for future use. API should always return PWP_TRUE.
See also
PWP_LICENSEDATA

Definition at line 110 of file apiPWP.cxx.

References PWP_FALSE, PWP_TRUE, and PwuFindPublishedAPI().

Referenced by CaePlugin< MT >::isLicensed().

◆ PwpSetLanguage()

PWP_PROTOTYPE_DECL PWP_VOID PwpSetLanguage ( const char  language[])

Sets the active language.

If the specified language is not supported, the plugin should default to "us-english".

Parameters
languageThe language identifier.
Note
The supported language values are:
"us-english" - United States English

Definition at line 130 of file apiPWP.cxx.

Referenced by CaePlugin< MT >::setLanguage().

◆ PwpSetMessageCallback()

PWP_PROTOTYPE_DECL PWP_MESSAGECB PwpSetMessageCallback ( const char  api[],
PWP_MESSAGECB  msgCB 
)

Sets the message callback function for the given api.

The plugin uses this callback to send api specific messages to the framework.

Parameters
apiThe target api. Must be one of the values returned from PwpEnumAPIs() or one of the special api targets listed in notes.
msgCBPointer to a function with the signature defined by PWP_MESSAGECB.
Returns
The previous message callback function.
See also
PwpEnumAPIs, PWP_MESSAGECB_DEFAULT, PWP_MESSAGECB_SPY
Note
The available special api targets are:
PWP_MESSAGECB_DEFAULT - Any messages not routed to an api-specific callback will be sent to this handler.
PWP_MESSAGECB_SPY - All messages are copied and routed to this handler after any api-specific callbacks are done. Any values returned from the spy are ignored.

Definition at line 116 of file apiPWP.cxx.

References PWU_RTITEM::msgCB, and PwuFindTotalAPI().

PWP_APIINFO::ver
PWP_VERSION ver
API spec version.
Definition: apiPWP.h:658
PWP_UINT32
unsigned int PWP_UINT32
32-bit unsigned integer
Definition: apiPWP.h:210
PWP_VERSION::major
PWP_VERSIONVAL major
the major version value
Definition: apiPWP.h:479
PWP_APIINFO
The API information returned by plugins for each supported API.
Definition: apiPWP.h:652
PWP_VERSION::minor
PWP_VERSIONVAL minor
the minor version value
Definition: apiPWP.h:483
PWP_APIINFO::name
const char * name
full API spec name
Definition: apiPWP.h:655