Pointwise Plugin SDK
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros
Data Handle Helper Macros
+ Collaboration diagram for Data Handle Helper Macros:

Macros

#define PWP_BADID   (~((PWP_UINT32)0))
 Bad id value. More...
 
#define PWP_BADTYPE   ((unsigned char)~0)
 Bad type value. More...
 
#define PWP_DECLARE_HANDLE(name)
 Declares a root-level, strongly-typed data handle type. More...
 
#define PWP_DECLARE_HEGRPITEM(sname, name)
 Declares a sub-element group data handle type. More...
 
#define PWP_DECLARE_HELEMGROUP(pname, name)
 Declares a parented, strongly-typed, element group data handle type. More...
 
#define PWP_HANDLE_GET_IMPL(h, hTyp)   reinterpret_cast<hTyp##_IMPL*>(h)
 get an implementation ptr from internal handle values More...
 
#define PWP_HANDLE_INIT   0
 Static init value for a PWP_DECLARE_HANDLE() handle. More...
 
#define PWP_HANDLE_ISVALID(h)   (0 != h)
 Test the validity of a PWP_DECLARE_HANDLE() handle. More...
 
#define PWP_HANDLE_SET(h, v)   h=v
 Runtime set of a PWP_DECLARE_HANDLE() handle. More...
 
#define PWP_HANDLE_SET_IMPL(h, hTyp, impl)   (h=reinterpret_cast<hTyp>(&impl))
 assigns internal handle values using an implementation More...
 
#define PWP_HEGI_H(h)   ((h).parent.hP)
 Extract the parent PWP_DECLARE_HELEMGROUP() handle. More...
 
#define PWP_HEGI_ID(h)   ((h).id)
 Extract the item id from a PWP_DECLARE_HEGRPITEM() handle. More...
 
#define PWP_HEGI_INIT   {{0, PWP_BADID}, PWP_BADTYPE, PWP_BADID}
 Static init value for a PWP_DECLARE_HEGRPITEM() handle. More...
 
#define PWP_HEGI_ISVALID(h)
 Test the validity of a PWP_DECLARE_HEGRPITEM() handle. More...
 
#define PWP_HEGI_PID(h)   ((h).parent.id)
 Extract the parent PWP_DECLARE_HELEMGROUP() id. More...
 
#define PWP_HEGI_PTYPE(h)   ((h).ptype)
 Extract the parent-type id from a PWP_DECLARE_HEGRPITEM() handle. More...
 
#define PWP_HEGI_SET(h, p, pt, pid, v)
 Runtime set of a PWP_DECLARE_HEGRPITEM() handle. More...
 
#define PWP_HEGRP_H(h)   ((h).hP)
 Extract the parent handle from a PWP_DECLARE_HELEMGROUP() handle. More...
 
#define PWP_HEGRP_ID(h)   ((h).id)
 Extract the id from a PWP_DECLARE_HELEMGROUP() handle. More...
 
#define PWP_HEGRP_INIT   {0,PWP_BADID}
 Static init value for a PWP_DECLARE_HELEMGROUP() handle. More...
 
#define PWP_HEGRP_ISVALID(h)
 Test the validity of a PWP_DECLARE_HELEMGROUP() handle. More...
 
#define PWP_HEGRP_SET(h, p, v)   { (h).hP=(p); (h).id=(v); }
 Runtime set of a PWP_DECLARE_HELEMGROUP() handle. More...
 

Detailed Description

Base data handle helper macros. The are used to implement opaque, API-specific, data handles. See PWGM_HGRIDMODEL for an example.

Macro Definition Documentation

#define PWP_BADID   (~((PWP_UINT32)0))

Bad id value.

Definition at line 363 of file apiPWP.h.

#define PWP_BADTYPE   ((unsigned char)~0)

Bad type value.

Definition at line 366 of file apiPWP.h.

#define PWP_DECLARE_HANDLE (   name)
Value:
typedef struct name##_t { \ \
int unused; \ \
} * name

Declares a root-level, strongly-typed data handle type.

Parameters
nameThe handle type-name.

Definition at line 340 of file apiPWP.h.

#define PWP_DECLARE_HEGRPITEM (   sname,
  name 
)
Value:
typedef struct name##_t { \ \
sname parent; \
unsigned char ptype; \
PWP_UINT32 id; \ \
} name
unsigned int PWP_UINT32
32-bit unsigned integer
Definition: apiPWP.h:210

Declares a sub-element group data handle type.

Parameters
snameParent type-name declared using PWP_DECLARE_HELEMGROUP(pname,sname)
nameThe sub-element group handle type-name.

Definition at line 405 of file apiPWP.h.

#define PWP_DECLARE_HELEMGROUP (   pname,
  name 
)
Value:
typedef struct name##_t { \ \
pname hP; \
PWP_UINT32 id; \ \
} name
unsigned int PWP_UINT32
32-bit unsigned integer
Definition: apiPWP.h:210

Declares a parented, strongly-typed, element group data handle type.

Parameters
pnameParent type-name declared using PWP_DECLARE_HANDLE(pname)
nameThe element group handle type-name.

Definition at line 375 of file apiPWP.h.

#define PWP_HANDLE_GET_IMPL (   h,
  hTyp 
)    reinterpret_cast<hTyp##_IMPL*>(h)

get an implementation ptr from internal handle values

Definition at line 360 of file apiPWP.h.

#define PWP_HANDLE_INIT   0

Static init value for a PWP_DECLARE_HANDLE() handle.

Definition at line 351 of file apiPWP.h.

#define PWP_HANDLE_ISVALID (   h)    (0 != h)

Test the validity of a PWP_DECLARE_HANDLE() handle.

Definition at line 348 of file apiPWP.h.

#define PWP_HANDLE_SET (   h,
 
)    h=v

Runtime set of a PWP_DECLARE_HANDLE() handle.

Definition at line 354 of file apiPWP.h.

#define PWP_HANDLE_SET_IMPL (   h,
  hTyp,
  impl 
)    (h=reinterpret_cast<hTyp>(&impl))

assigns internal handle values using an implementation

Definition at line 357 of file apiPWP.h.

#define PWP_HEGI_H (   h)    ((h).parent.hP)

Extract the parent PWP_DECLARE_HELEMGROUP() handle.

Definition at line 427 of file apiPWP.h.

#define PWP_HEGI_ID (   h)    ((h).id)

Extract the item id from a PWP_DECLARE_HEGRPITEM() handle.

Definition at line 436 of file apiPWP.h.

#define PWP_HEGI_INIT   {{0, PWP_BADID}, PWP_BADTYPE, PWP_BADID}

Static init value for a PWP_DECLARE_HEGRPITEM() handle.

Definition at line 419 of file apiPWP.h.

#define PWP_HEGI_ISVALID (   h)
Value:
(PWP_HANDLE_ISVALID((h).parent.hP) && \
(PWP_BADID != (h).parent.id) && \
(PWP_BADTYPE != (h).ptype) && \
(PWP_BADID != (h).id))
#define PWP_HANDLE_ISVALID(h)
Test the validity of a PWP_DECLARE_HANDLE() handle.
Definition: apiPWP.h:348
#define PWP_BADID
Bad id value.
Definition: apiPWP.h:363
#define PWP_BADTYPE
Bad type value.
Definition: apiPWP.h:366

Test the validity of a PWP_DECLARE_HEGRPITEM() handle.

Definition at line 414 of file apiPWP.h.

#define PWP_HEGI_PID (   h)    ((h).parent.id)

Extract the parent PWP_DECLARE_HELEMGROUP() id.

Definition at line 430 of file apiPWP.h.

#define PWP_HEGI_PTYPE (   h)    ((h).ptype)

Extract the parent-type id from a PWP_DECLARE_HEGRPITEM() handle.

Definition at line 433 of file apiPWP.h.

#define PWP_HEGI_SET (   h,
  p,
  pt,
  pid,
 
)
Value:
{ (h).parent.hP=(p); \
(h).parent.id=(pid); \
(h).ptype=(pt); \
(h).id=(v); }

Runtime set of a PWP_DECLARE_HEGRPITEM() handle.

Definition at line 422 of file apiPWP.h.

#define PWP_HEGRP_H (   h)    ((h).hP)

Extract the parent handle from a PWP_DECLARE_HELEMGROUP() handle.

Definition at line 392 of file apiPWP.h.

#define PWP_HEGRP_ID (   h)    ((h).id)

Extract the id from a PWP_DECLARE_HELEMGROUP() handle.

Definition at line 395 of file apiPWP.h.

#define PWP_HEGRP_INIT   {0,PWP_BADID}

Static init value for a PWP_DECLARE_HELEMGROUP() handle.

Definition at line 386 of file apiPWP.h.

#define PWP_HEGRP_ISVALID (   h)
Value:
(PWP_HANDLE_ISVALID((h).hP) && \
(PWP_BADID != (h).id))
#define PWP_HANDLE_ISVALID(h)
Test the validity of a PWP_DECLARE_HANDLE() handle.
Definition: apiPWP.h:348
#define PWP_BADID
Bad id value.
Definition: apiPWP.h:363

Test the validity of a PWP_DECLARE_HELEMGROUP() handle.

Definition at line 383 of file apiPWP.h.

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

#define PWP_HEGRP_SET (   h,
  p,
 
)    { (h).hP=(p); (h).id=(v); }

Runtime set of a PWP_DECLARE_HELEMGROUP() handle.

Definition at line 389 of file apiPWP.h.