Pointwise Plugin SDK
|
Base plugin utilities. More...
Go to the source code of this file.
Macros | |
#define | ARRAYSIZE(arrname) (PWP_UINT32)(sizeof(arrname)/sizeof(arrname[0])) |
Calculates the size of a statically declared array. More... | |
#define | ASSERT(expr) ((void)0) |
Run time assert macro. More... | |
#define | ASSERT_COMPILE(x) extern char __dummy[-1 + (2 * (int)(x))] |
Compile time assert macro. More... | |
#define | MAKEGUID(usr_id) MAKEGUID2(PWP_SITE_GROUPID,usr_id) |
Builds a 32-bit Globally Unique Id (GUID). More... | |
#define | MAKEGUID2(hi16, low16) |
Builds a 32-bit id value. More... | |
#define | PWP_GROUPNAME_DEFAULT "PWP_SITE_GROUPNAME" |
The default site group name. More... | |
#define | PWP_GRPID_USER (PWP_UINT32)(63000UL) |
The first group id value available for local, internal use. More... | |
#define | VERIFY_EXPLICIT_CAST(from, to) ASSERT_COMPILE(sizeof(from) == sizeof(to)) |
Helper macro that verifies the sizes of two objects are the same. More... | |
Base plugin utilities.
Defines a set of helper/utility macros useful to all plugins.
Definition in file apiUtils.h.
#define ARRAYSIZE | ( | arrname | ) | (PWP_UINT32)(sizeof(arrname)/sizeof(arrname[0])) |
Calculates the size of a statically declared array.
Definition at line 164 of file apiUtils.h.
#define ASSERT | ( | expr | ) | ((void)0) |
Run time assert macro.
In debug builds, this macro forces a run time fail if expr is FALSE. In release builds, this macro does nothing.
It works for both C and C++ compilations.
Definition at line 192 of file apiUtils.h.
#define ASSERT_COMPILE | ( | x | ) | extern char __dummy[-1 + (2 * (int)(x))] |
Compile time assert macro.
This macro forces a compile time fail if const_expr is FALSE.
It only works if const_expr is a constant expression that can be evaluated at compile time.
It works for both C and C++ compilations.
Definition at line 234 of file apiUtils.h.
#define MAKEGUID | ( | usr_id | ) | MAKEGUID2(PWP_SITE_GROUPID,usr_id) |
Builds a 32-bit Globally Unique Id (GUID).
This macro uses the PWP_SITE_GROUPID for the upper, 16-bits of the resulting GUID. See PWP_SITE_GROUPID for important information.
usr_id | Any locally unique, unsigned 16-bit value. The developer is responsible for the local uniqueness of the usr_id values. |
Definition at line 108 of file apiUtils.h.
#define MAKEGUID2 | ( | hi16, | |
low16 | |||
) |
Builds a 32-bit id value.
This macro is intended to build GUIDs.
hi16 | Any unsigned 16-bit value from 0 to 65535 (hex FFFF). The lower 16 bits of this value are shifted to the upper 16 bits of the resulting 32-bit GUID value. |
low16 | Any unsigned 16-bit value from 0 to 65535 (hex FFFF). These bits are placed in the lower word of the resulting 32-bit value. |
Definition at line 47 of file apiUtils.h.
#define PWP_GROUPNAME_DEFAULT "PWP_SITE_GROUPNAME" |
The default site group name.
Unless specified in site.h, PWP_SITE_GROUPNAME will default to this value.
Definition at line 72 of file apiUtils.h.
#define PWP_GRPID_USER (PWP_UINT32)(63000UL) |
The first group id value available for local, internal use.
Group ids issued by Pointwise will always be less than this value. The Maximum allowed group id value is 65535.
Unless specified in site.h, PWP_SITE_GROUPID will default to this value.
Definition at line 62 of file apiUtils.h.
#define VERIFY_EXPLICIT_CAST | ( | from, | |
to | |||
) | ASSERT_COMPILE(sizeof(from) == sizeof(to)) |
Helper macro that verifies the sizes of two objects are the same.
Definition at line 251 of file apiUtils.h.