Pointwise Plugin SDK
|
GRDP utilities. More...
#include <stdio.h>
#include <time.h>
#include "apiGRDP.h"
#include "apiPWP.h"
#include "apiPWPUtils.h"
#include "apiGridModel.h"
#include "rtGrdpInstanceData.h"
Go to the source code of this file.
Classes | |
struct | GRDP_RTITEM |
The data representing a grid importer instance. More... | |
Macros | |
#define | GRDP_CLKS_TO_FSECS(c) ((PWP_FLOAT)(c) / (PWP_FLOAT)CLOCKS_PER_SEC) |
Returns the clock value c as seconds (PWP_FLOAT). More... | |
#define | GRDP_CLKS_TO_HMS(c, h, m, s) |
Returns the clock value c decomposed into hours, minutes, and seconds (PWP_INT32). That is, c == (h * 3600 + m * 60 + s) * CLOCKS_PER_SEC. More... | |
#define | GRDP_CLKS_TO_HOURS(c) (GRDP_CLKS_TO_MINS(c) / 60) |
Returns the clock value c as hours (PWP_INT32). Only whole hour values are possible. More... | |
#define | GRDP_CLKS_TO_MINS(c) (GRDP_CLKS_TO_SECS(c) / 60) |
Returns the clock value c as minutes (PWP_INT32). Only whole minute values are possible. More... | |
#define | GRDP_CLKS_TO_MSECS(c) ((PWP_INT32)((c) * 1000) / CLOCKS_PER_SEC) |
Returns the clock value c as milli seconds (PWP_INT32). Only whole ms values are possible. More... | |
#define | GRDP_CLKS_TO_SECS(c) ((PWP_INT32)(c) / CLOCKS_PER_SEC) |
Returns the clock value c as seconds (PWP_INT32). Only whole second values are possible. More... | |
#define | GRDP_IS_CLKS_ID(id) PWP_CAST_BOOL(((id) >= 0) && ((id) <= GRDP_CLKS_LAST)) |
Returns PWP_TRUE if id is a valid GRDP_ENUM_CLOCKS id. More... | |
#define | GRDP_RT_ABORT(rti) ((rti)->opAborted = PWP_TRUE) |
Used by plugin to mark the import operation as aborted. More... | |
#define | GRDP_RT_CLKS_DIFF(rti, startId, endId) |
Returns the clock time difference between startId and endId as clocks[endId] - clocks[startId]. The ids are validated. More... | |
#define | GRDP_RT_CLKS_DIFF_STEP(rti) GRDP_RT_CLKS_DIFF(rti, GRDP_CLKS_BEGSTEP, GRDP_CLKS_ENDSTEP) |
Returns the current clock time difference between GRDP_CLKS_BEGSTEP and GRDP_CLKS_ENDSTEP. More... | |
#define | GRDP_RT_CLKS_DIFF_TOTAL(rti) GRDP_RT_CLKS_DIFF(rti, GRDP_CLKS_PROGINIT, GRDP_CLKS_PROGEND) |
Returns the current clock time difference between GRDP_CLKS_PROGINIT and GRDP_CLKS_PROGEND. More... | |
#define | GRDP_RT_CLKS_ID(rti, id) (GRDP_IS_CLKS_ID(id)? (rti)->clocks[id]: 0) |
Returns the clock time value for the given id. The id is validated. More... | |
#define | GRDP_RT_CLKS_POLL(rti, id) GRDP_RT_CLKS_DIFF(rti, id, GRDP_CLKS_PROGINCR) |
Returns the current clock time difference between id and GRDP_CLKS_PROGINCR. More... | |
#define | GRDP_RT_CLKS_POLL_STEP(rti) GRDP_RT_CLKS_POLL(rti, GRDP_CLKS_BEGSTEP) |
Returns the current clock time difference between GRDP_CLKS_BEGSTEP and GRDP_CLKS_PROGINCR. More... | |
#define | GRDP_RT_CLKS_POLL_TOTAL(rti) GRDP_RT_CLKS_POLL(rti, GRDP_CLKS_PROGINIT) |
Returns the current clock time difference between GRDP_CLKS_PROGINIT and GRDP_CLKS_PROGINCR. More... | |
#define | GRDP_RT_IMPORT_CONDITIONS(rti) (rti)->pReadInfo->importConditions |
Returns PWP_TRUE if condition import is requested. More... | |
#define | GRDP_RT_IS_ABORTED(rti) PWP_CAST_BOOL((rti)->opAborted) |
Returns PWP_TRUE if the import has been aborted by the user or the plugin itself. More... | |
Enumerations | |
enum | GRDP_ENUM_CLOCKS { GRDP_CLKS_PROGUPDATE, GRDP_CLKS_PROGINIT, GRDP_CLKS_BEGSTEP, GRDP_CLKS_PROGINCR, GRDP_CLKS_ENDSTEP, GRDP_CLKS_PROGEND } |
Supported GRDP clock id values. More... | |
Functions | |
PWP_BOOL | grdpAssignInfoValue (const char name[], const char value[], const bool create=true) |
Creates a key/string-value pair that defines a GRDP info attribute. More... | |
PWP_BOOL | grdpAssignInfoValueBool (const char name[], const bool value, const bool create=true) |
Creates a key/bool-value pair that defines a GRDP info attribute. More... | |
PWP_BOOL | grdpAssignInfoValueEnum (const char name[], const char value[], bool create=true) |
Creates a key/enum-value pair that defines a GRDP info attribute. More... | |
PWP_BOOL | grdpAssignInfoValueInt (const char name[], const PWP_INT value, const bool create=true) |
Creates a key/PWP_INT-value pair that defines a GRDP info attribute. More... | |
PWP_BOOL | grdpAssignInfoValueReal (const char name[], const PWP_REAL value, const bool create=true) |
Creates a key/PWP_REAL-value pair that defines a GRDP info attribute. More... | |
PWP_BOOL | grdpAssignInfoValueUInt (const char name[], const PWP_UINT value, const bool create=true) |
Creates a key/PWP_UINT-value pair that defines a GRDP info attribute. More... | |
GRDP_RTITEM * | grdpFindFormatById (PWP_UINT32 id) |
Find an item in grdpRtItem[] by it's id. More... | |
GRDP_RTITEM * | grdpFindFormatByName (const char name[]) |
Find an item in grdpRtItem[] by it's name. More... | |
PWP_BOOL | grdpProgressBeginStep (GRDP_RTITEM *pRti, PWP_UINT32 total) |
Begins a progress tracking step. More... | |
PWP_BOOL | grdpProgressEnd (GRDP_RTITEM *pRti, const PWP_BOOL ok) |
Ends all progress tracking. More... | |
PWP_BOOL | grdpProgressEndStep (GRDP_RTITEM *pRti) |
Completes a progress tracking major step. More... | |
PWP_BOOL | grdpProgressIncr (GRDP_RTITEM *pRti) |
Completes a progress tracking sub-step. More... | |
PWP_BOOL | grdpProgressInit (GRDP_RTITEM *pRti, PWP_UINT32 cnt) |
Initializes a progress tracking session. More... | |
PWP_BOOL | grdpPublishValueDefinition (const char name[], PWP_ENUM_VALTYPE type, const char value[], const char access[], const char desc[], const char range[]) |
Creates a collection of key/value pairs that represent a published grid import attribute definition. More... | |
void | grdpSendDebugMsg (GRDP_RTITEM *pRti, const char txt[], PWP_UINT32 code) |
Send a debug text message (PWP_MSGID_DEBUG) to the framework. More... | |
void | grdpSendErrorMsg (GRDP_RTITEM *pRti, const char txt[], PWP_UINT32 code) |
Send an error text message (PWP_MSGID_ERROR) to the framework. More... | |
void | grdpSendInfoMsg (GRDP_RTITEM *pRti, const char txt[], PWP_UINT32 code) |
Send an info text message (PWP_MSGID_INFO) to the framework. More... | |
void | grdpSendWarningMsg (GRDP_RTITEM *pRti, const char txt[], PWP_UINT32 code) |
Send a warning text message (PWP_MSGID_WARNING) to the framework. More... | |
Variables | |
PWP_UINT32 | grdpFormatCnt |
The number of entries in grdpRtItem[] array. More... | |
GRDP_RTITEM | grdpRtItem [] |
The runtime array of GRDP_RTITEM items. More... | |
GRDP utilities.
A collection of helpful data and functions useful to GRDP compliant plugins.
Functions used to report progress status during an import.
These functions access data stored in a GRDP_RTITEM instance to track the progress and forward calls the appropriate grdpProgressInit(), grdpProgressEnd(), grdpProgressStatus(), grdpProgressNextStep(), grdpProgressQuit() functions.
Functions used to find an entry in the GRDP_RTITEM array.
Definition in file apiGRDPUtils.h.