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

◆ PWP_BADTYPE

#define PWP_BADTYPE   ((unsigned char)~0)

Bad type value.

Definition at line 366 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 340 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 405 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 375 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 360 of file apiPWP.h.

◆ PWP_HANDLE_INIT

#define PWP_HANDLE_INIT   0

Static init value for a PWP_DECLARE_HANDLE() handle.

Definition at line 351 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 348 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 354 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 357 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 427 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 436 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 419 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))

Test the validity of a PWP_DECLARE_HEGRPITEM() handle.

Definition at line 414 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 430 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 433 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 422 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 392 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 395 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 386 of file apiPWP.h.

◆ PWP_HEGRP_ISVALID

#define PWP_HEGRP_ISVALID (   h)
Value:
(PWP_HANDLE_ISVALID((h).hP) && \
(PWP_BADID != (h).id))

Test the validity of a PWP_DECLARE_HELEMGROUP() handle.

Definition at line 383 of file apiPWP.h.

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

PWP_HANDLE_ISVALID
#define PWP_HANDLE_ISVALID(h)
Test the validity of a PWP_DECLARE_HANDLE() handle.
Definition: apiPWP.h:348
PWP_BADID
#define PWP_BADID
Bad id value.
Definition: apiPWP.h:363
PWP_BADTYPE
#define PWP_BADTYPE
Bad type value.
Definition: apiPWP.h:366