Pointwise CAE Plugin SDK
Classes | Macros | Enumerations | Functions | Variables
apiPWPUtils.h File Reference

Data and functions useful to PWP-API compliant plugins. More...

#include "apiPWP.h"
#include "pwpPlatform.h"
+ Include dependency graph for apiPWPUtils.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  PWU_RTITEM
 The runtime data representing a PWP-API suported by a plugin. More...
 
struct  PWU_UNFDATA
 Unformatted file data block. More...
 
struct  PwuHeapStats
 Heap statistics data structure passed to PWU_HEAP_CALCSTATS. More...
 

Macros

#define PWU_HEAP_TYPE(datatype)   PwuHeap_##datatype
 The heap-type suitable for function parameters, etc. More...
 
#define PWU_HEAP_HEADER(datatype)
 Declares the strictly-typed, public interface for a given heap-type. More...
 
#define PWU_HEAP_EXTERN(heapName, datatype)   extern PwuHeap_##datatype heapName;
 External declaration for a distinct instance of a typed heap. More...
 
#define PWU_HEAP_BODY(datatype)
 Implements the heap functions for a given heap-type. More...
 
#define PWU_HEAP_CREATE(heapName, datatype, hint)
 Creates a distinct instance of a typed heap. More...
 
#define PWU_HEAP_ALLOCITEMS(heapName, num)   (*heapName.allocItems)(&heapName, num)
 Allocates a contiguous block of items from a heap. More...
 
#define PWU_HEAP_SET_HINT(heapName, h)   heapName.heap.hint = h
 Changes a heap's suggested items per page. More...
 
#define PWU_HEAP_DESTROY(heapName)   PwuHeapDtor((PwuHeap*)&heapName)
 Release all memory associated with a heap. More...
 
#define PWU_HEAP_CALCSTATS(heapName, stats)   PwuHeapCalcStats((PwuHeap*)&heapName, &stats)
 Obtain heap usage statistics. More...
 

Enumerations

enum  PWU_ENDIANNESS {
  PWU_ENDIAN_ERROR,
  PWU_ENDIAN_NATIVE,
  PWU_ENDIAN_FOREIGN,
  PWU_ENDIAN_LITTLE,
  PWU_ENDIAN_BIG
}
 Flags used to indicate endianness or control endian behaviors in functions. More...
 

Functions

PWU_RTITEMPwuFindTotalAPI (const char api[])
 Find any api in pwpRtItem[]. More...
 
PWU_RTITEMPwuFindPublishedAPI (const char api[])
 Find a published api in pwpRtItem[]. More...
 
PWP_MESSAGECB PwuFindApiMsgCB (const char api[])
 Search pwpRtItem[] for an API's messageCB. More...
 
PWP_UINT32 PwuSendMsg (const char api[], PWP_ENUM_MSGID id, void *pMsg)
 Send a message from an api. More...
 
void PwuSendDebugMsg (const char api[], const char txt[], PWP_UINT32 code)
 Send a debug text message (PWP_MSGID_DEBUG) to the framework. More...
 
void PwuSendInfoMsg (const char api[], const char txt[], PWP_UINT32 code)
 Send an info text message (PWP_MSGID_INFO) to the framework. More...
 
void PwuSendWarningMsg (const char api[], const char txt[], PWP_UINT32 code)
 Send a warning text message (PWP_MSGID_WARNING) to the framework. More...
 
void PwuSendErrorMsg (const char api[], const char txt[], PWP_UINT32 code)
 Send an error text message (PWP_MSGID_ERROR) to the framework. More...
 
PWP_BOOL PwuProgressBegin (const char api[], PWP_UINT32 totalSteps)
 Send a progress begin message (PWP_MSGID_PROGBEGIN) to the framework. More...
 
void PwuProgressEnd (const char api[], PWP_BOOL ok)
 Send a progress end message (PWP_MSGID_PROGEND) to the framework. More...
 
PWP_BOOL PwuProgressStatus (const char api[], PWP_UINT32 complete, PWP_UINT32 total)
 Send a progress status message (PWP_MSGID_PROGSTATUS, value >= 0) to the framework. More...
 
PWP_BOOL PwuProgressNextStep (const char api[])
 Send a progress "next step" message (PWP_MSGID_PROGSTATUS, value = -1) to the framework. More...
 
PWP_BOOL PwuProgressQuit (const char api[])
 Send a progress query-quit message (PWP_MSGID_PROGQUIT) to the framework. More...
 
PWU_ENDIANNESS PwuGetOsEndianness (void)
 Query the OS's native endianness. More...
 
const void * PwuApplyEndianness (PWU_ENDIANNESS endianness, const void *buf, size_t size)
 Apply specified byte order to buf containing size bytes. More...
 
PWU_ENDIANNESS PwuUnfFileSetEndianness (PWU_UNFDATA *pUData, PWU_ENDIANNESS endianness)
 Set the output endianness. More...
 
PWU_ENDIANNESS PwuUnfFileGetEndianness (PWU_UNFDATA *pUData)
 Get the output endianness setting for this PWU_UNFDATA block. More...
 
PWP_BOOL PwuUnfFileBegin (FILE *fp, PWU_UNFDATA *pUData)
 Prepares a PWU_UNFDATA block for a new unformatted file I/O session. More...
 
PWP_BOOL PwuUnfRecBegin (PWU_UNFDATA *pUData)
 Prepares a PWU_UNFDATA block for writing a new unformatted data record. More...
 
PWP_BOOL PwuUnfRecBeginFixed (PWU_UNFDATA *pUData, PWP_UINT32 bytes, PWP_UINT32 count)
 Prepares a PWU_UNFDATA block for writing a new unformatted data record when the amount of data being written is known ahead of time. More...
 
PWP_BOOL PwuUnfRecWriteArr (PWU_UNFDATA *pUData, const void *arr, size_t itemSize, size_t itemCnt)
 Write an array of data to the current record. More...
 
PWP_BOOL PwuUnfRecWriteBuf (PWU_UNFDATA *pUData, const void *buf, size_t size)
 Write a data buffer to the current record. More...
 
PWP_BOOL PwuUnfRecWriteEndianBuf (PWU_UNFDATA *pUData, const void *buf, size_t size)
 Write a data buffer to the current record with endian order applied. More...
 
PWP_BOOL PwuUnfRecWriteINT (PWU_UNFDATA *pUData, PWP_INT val)
 Write a PWP_INT value to the current record with endian order applied. More...
 
PWP_BOOL PwuUnfRecWriteUINT (PWU_UNFDATA *pUData, PWP_UINT val)
 Write a PWP_UINT value to the current record with endian order applied. More...
 
PWP_BOOL PwuUnfRecWriteINT8 (PWU_UNFDATA *pUData, PWP_INT8 val)
 Write a PWP_INT8 value to the current record with endian order applied. More...
 
PWP_BOOL PwuUnfRecWriteUINT8 (PWU_UNFDATA *pUData, PWP_UINT8 val)
 Write a PWP_UINT8 value to the current record with endian order applied. More...
 
PWP_BOOL PwuUnfRecWriteINT16 (PWU_UNFDATA *pUData, PWP_INT16 val)
 Write a PWP_INT16 value to the current record with endian order applied. More...
 
PWP_BOOL PwuUnfRecWriteUINT16 (PWU_UNFDATA *pUData, PWP_UINT16 val)
 Write a PWP_UINT16 value to the current record with endian order applied. More...
 
PWP_BOOL PwuUnfRecWriteINT32 (PWU_UNFDATA *pUData, PWP_INT32 val)
 Write a PWP_INT32 value to the current record with endian order applied. More...
 
PWP_BOOL PwuUnfRecWriteUINT32 (PWU_UNFDATA *pUData, PWP_UINT32 val)
 Write a PWP_UINT32 value to the current record with endian order applied. More...
 
PWP_BOOL PwuUnfRecWriteINT64 (PWU_UNFDATA *pUData, PWP_INT64 val)
 Write a PWP_INT64 value to the current record with endian order applied. More...
 
PWP_BOOL PwuUnfRecWriteUINT64 (PWU_UNFDATA *pUData, PWP_UINT64 val)
 Write a PWP_UINT64 value to the current record with endian order applied. More...
 
PWP_BOOL PwuUnfRecWriteFLOAT (PWU_UNFDATA *pUData, PWP_FLOAT val)
 Write a PWP_FLOAT value to the current record with endian order applied. More...
 
PWP_BOOL PwuUnfRecWriteREAL (PWU_UNFDATA *pUData, PWP_REAL val)
 Write a PWP_REAL value to the current record with endian order applied. More...
 
PWP_BOOL PwuUnfRecEnd (PWU_UNFDATA *pUData)
 Finalize the current record write. More...
 
PWP_BOOL PwuUnfFileEnd (PWU_UNFDATA *pUData)
 Finalize an unformatted file I/O session. More...
 
PWP_BOOL PwuUnfHadError (PWU_UNFDATA *pUData)
 Check if an unformatted file I/O session has detected any errors. More...
 
PWP_UINT32 PwuUnfRecBytes (PWU_UNFDATA *pUData)
 Get the running total number of bytes written to the current record during an unformatted file I/O session. More...
 
PWP_UINT32 PwuUnfTotRecBytes (PWU_UNFDATA *pUData)
 Get the running total number of bytes written to all records during an unformatted file I/O session. More...
 
PWP_UINT32 PwuUnfRecCount (PWU_UNFDATA *pUData)
 Get the running total number of finalized records written during an unformatted file I/O session. More...
 
PWP_BOOL PwuAssignValueString (const char group[], const char name[], const char value[], bool createIfNotExists=false)
 Assign or create a value. More...
 
PWP_BOOL PwuAssignValueInt (const char group[], const char name[], PWP_INT value, bool createIfNotExists=false)
 
PWP_BOOL PwuAssignValueUInt (const char group[], const char name[], PWP_UINT value, bool createIfNotExists=false)
 
PWP_BOOL PwuAssignValueReal (const char group[], const char name[], PWP_REAL value, bool createIfNotExists=false)
 
PWP_BOOL PwuAssignValueEnum (const char group[], const char name[], const char value[], bool createIfNotExists=false)
 
PWP_BOOL PwuPublishValueDefinition (const char group[], const char name[], PWP_ENUM_VALTYPE type, const char value[], const char access[], const char desc[], const char range[])
 Create a value. More...
 
PWP_BOOL PwuGetValue (const char group[], const char name[], PWP_HVALUE value)
 Implementation of the PwpGetValue() API function. More...
 
PWP_BOOL PwuValueSetString (PWP_HVALUE value, const char *val)
 Set the value of a variable handle. More...
 
PWP_BOOL PwuValueSetInt (PWP_HVALUE value, PWP_INT val)
 Set the value of a variable handle. More...
 
PWP_BOOL PwuValueSetUInt (PWP_HVALUE value, PWP_UINT val)
 Set the value of a variable handle. More...
 
PWP_BOOL PwuValueSetReal (PWP_HVALUE value, PWP_REAL val)
 Set the value of a variable handle. More...
 
PWP_BOOL PwuValueSetEnum (PWP_HVALUE value, const char *val)
 Set the value of a variable handle. More...
 

Variables

PWU_RTITEM pwpRtItem []
 The runtime array of PWU_RTITEM items. More...
 
PWP_UINT32 totalApiCnt
 The total # of published and unpublished entries in pwpRtItem[]. More...
 
PWP_UINT32 publishedApiCnt
 The total # of published entries in pwpRtItem[]. More...
 

Detailed Description

Data and functions useful to PWP-API compliant plugins.

Definition in file apiPWPUtils.h.