Pointwise Plugin SDK
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

◆ PWP_BADID

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

Bad id value.

Definition at line 365 of file apiPWP.h.

◆ PWP_BADTYPE

#define PWP_BADTYPE   ((unsigned char)~0)

Bad type value.

Definition at line 368 of file apiPWP.h.

◆ PWP_DECLARE_HANDLE

#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 342 of file apiPWP.h.

◆ PWP_DECLARE_HEGRPITEM

#define PWP_DECLARE_HEGRPITEM (   sname,
  name 
)
Value:
typedef struct name##_t { \ \
sname parent; \
unsigned char ptype; \
PWP_UINT32 id; \ \
} name

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 407 of file apiPWP.h.

◆ PWP_DECLARE_HELEMGROUP

#define PWP_DECLARE_HELEMGROUP (   pname,
  name 
)
Value:
typedef struct name##_t { \ \
pname hP; \
PWP_UINT32 id; \ \
} name

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 377 of file apiPWP.h.

◆ PWP_HANDLE_GET_IMPL

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

get an implementation ptr from internal handle values

Definition at line 362 of file apiPWP.h.

◆ PWP_HANDLE_INIT

#define PWP_HANDLE_INIT   0

Static init value for a PWP_DECLARE_HANDLE() handle.

Definition at line 353 of file apiPWP.h.

◆ PWP_HANDLE_ISVALID

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

Test the validity of a PWP_DECLARE_HANDLE() handle.

Definition at line 350 of file apiPWP.h.

◆ PWP_HANDLE_SET

#define PWP_HANDLE_SET (   h,
 
)    h=v

Runtime set of a PWP_DECLARE_HANDLE() handle.

Definition at line 356 of file apiPWP.h.

◆ PWP_HANDLE_SET_IMPL

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

assigns internal handle values using an implementation

Definition at line 359 of file apiPWP.h.

◆ PWP_HEGI_H

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

Extract the parent PWP_DECLARE_HELEMGROUP() handle.

Definition at line 429 of file apiPWP.h.

◆ PWP_HEGI_ID

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

Extract the item id from a PWP_DECLARE_HEGRPITEM() handle.

Definition at line 438 of file apiPWP.h.

◆ PWP_HEGI_INIT

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

Static init value for a PWP_DECLARE_HEGRPITEM() handle.

Definition at line 421 of file apiPWP.h.

◆ PWP_HEGI_ISVALID

#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:350
#define PWP_BADID
Bad id value.
Definition: apiPWP.h:365
#define PWP_BADTYPE
Bad type value.
Definition: apiPWP.h:368

Test the validity of a PWP_DECLARE_HEGRPITEM() handle.

Definition at line 416 of file apiPWP.h.

◆ PWP_HEGI_PID

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

Extract the parent PWP_DECLARE_HELEMGROUP() id.

Definition at line 432 of file apiPWP.h.

◆ PWP_HEGI_PTYPE

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

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

Definition at line 435 of file apiPWP.h.

◆ PWP_HEGI_SET

#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 424 of file apiPWP.h.

◆ PWP_HEGRP_H

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

Extract the parent handle from a PWP_DECLARE_HELEMGROUP() handle.

Definition at line 394 of file apiPWP.h.

◆ PWP_HEGRP_ID

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

Extract the id from a PWP_DECLARE_HELEMGROUP() handle.

Definition at line 397 of file apiPWP.h.

◆ PWP_HEGRP_INIT

#define PWP_HEGRP_INIT   {0,PWP_BADID}

Static init value for a PWP_DECLARE_HELEMGROUP() handle.

Definition at line 388 of file apiPWP.h.

◆ PWP_HEGRP_ISVALID

#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:350
#define PWP_BADID
Bad id value.
Definition: apiPWP.h:365

Test the validity of a PWP_DECLARE_HELEMGROUP() handle.

Definition at line 385 of file apiPWP.h.

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

◆ PWP_HEGRP_SET

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

Runtime set of a PWP_DECLARE_HELEMGROUP() handle.

Definition at line 391 of file apiPWP.h.