Open Inventor Reference
SoSubEvent.h File Reference

Go to the source code of this file.

Macros

#define SO_EVENT_HEADER()
 *** note: many of the macros use the "do { ... } while(0)" *** hack to define multiline blocks as a single statement *** of code that can be used anywhere and ended with a semicolon
 
#define SO__EVENT_VARS(className)    SoType className::classTypeId
 Macros to be called within the source file for an event subclass:
 
#define SO__EVENT_METHODS(className)
 Methods on the type.
 
#define SO_EVENT_SOURCE(className)
 These include all the definitions required at file scope.
 
#define SO_EVENT_INIT_CLASS(className, parentClass)
 This initializes the type identifer variables defined in SO_EVENT_HEADER .
 

Macro Definition Documentation

◆ SO__EVENT_METHODS

#define SO__EVENT_METHODS (   className)
Value:
\
SoType \
className::getTypeId() const \
{ \
return classTypeId; \
}

Definition at line 125 of file SoSubEvent.h.

◆ SO__EVENT_VARS

#define SO__EVENT_VARS (   className)     SoType className::classTypeId

This declares the static variables defined in SO_EVENT_HEADER

Definition at line 116 of file SoSubEvent.h.

◆ SO_EVENT_HEADER

#define SO_EVENT_HEADER ( )
Value:
public: \
static SoType getClassTypeId() /* Returns class type id */ \
{ return classTypeId; } \
virtual SoType getTypeId() const; /* Returns type id */ \
private: \
static SoType classTypeId /* Type id */
SoType has no virtual functions to keep it small...
Definition SoType.h:103

Macros to be called within the class definition header for an event subclass: These defines type-identifier and naming variables and methods that all subclasses and abstract subclasses must support.

Definition at line 97 of file SoSubEvent.h.

◆ SO_EVENT_INIT_CLASS

#define SO_EVENT_INIT_CLASS (   className,
  parentClass 
)
Value:
classTypeId = \
SoType::createType(parentClass::getClassTypeId(), \
SO__QUOTE(className))
#define SO__QUOTE(str)
Handy macros.
Definition SoBasic.h:69

This macro should be called from within initClass(). The parentClass argument should be the class that this subclass is derived from.

Definition at line 153 of file SoSubEvent.h.

◆ SO_EVENT_SOURCE

#define SO_EVENT_SOURCE (   className)
Value:
SO__EVENT_VARS(className); \
SO__EVENT_METHODS(className)
#define SO__EVENT_VARS(className)
Macros to be called within the source file for an event subclass:
Definition SoSubEvent.h:116

Definition at line 140 of file SoSubEvent.h.