Library | File Standard Definitions

Macro's Used in CIP C++ Headers

# define xbdeclare(CLASS) \
public: \
     static CLASS *cast (xobject *object); \
     static CLASS *softcast (xobject *object); \
     static xrttiobject *getClassRtti (); \
     static xbool isObjSameAs (xobject *object); \
     static xbool isObjKindOf (xobject *object);
 
# define xdeclare(CLASS) \
     xbdeclare (CLASS)
# define xsdeclare(CLASS) \
     xbdeclare (CLASS)
 
# define xaideclare(CLASS) \
     xdeclare (CLASS)
# define xaisdeclare(CLASS) \
     xsdeclare (CLASS)



Description

These macro definitions are used in CIP C++ class definitions to declare some useful service methods. The definitions for these methods are generated for CIP types from their CIPL definitions by the CIPL compiler. Macro xdeclare and xaideclare specify method declarations for compact and abstract interface classes respectively; macro xsdeclare and xaisdeclare specify method declarations for compact and abstract data collection classes respectively.



Macro Parameter

CLASS
  Name of the C++ class in which a macro is used.



Methods

static CLASS *cast (xobject *object)
  Casts object object to type CLASS. If the object is not of a type derived from this class type, throws exception cipXTypeMismatch.

static CLASS *softcast (xobject *object)
  Casts object object to type CLASS. If the object is not of a type derived from this class type, returns NULL

static xrttiobject *getClassRtti ()
  Returns run-time information handle for type CLASS.

xbool isObjSameAs (xobject *object)
  Returns xtrue if object object is of type CLASS, otherwise returns xfalse.

xbool isObjKindOf (xobject *object)
  Returns xtrue if object object is either of type CLASS or of a type derived from CLASS, otherwise returns xfalse.