Go to the documentation of this file.
69 #ifndef _SO_SUB_ACTION_
70 #define _SO_SUB_ACTION_
87 #define SO_ACTION_HEADER(className) \
89 virtual SoType getTypeId() const; \
90 static SoType getClassTypeId() \
91 { return classTypeId; } \
93 static void addMethod(SoType t, SoActionMethod method) \
94 { methods->addMethod(t, method); } \
95 static void enableElement(SoType t, int stkIndex) \
96 { enabledElements->enable(t, stkIndex);} \
98 virtual const SoEnabledElementsList & getEnabledElements() const; \
99 static SoEnabledElementsList *enabledElements; \
100 static SoActionMethodList *methods; \
102 static SoType classTypeId
114 #define SO__ACTION_VARS(className) \
115 SoEnabledElementsList *className::enabledElements; \
116 SoActionMethodList *className::methods; \
117 SoType className::classTypeId
124 #define SO__ACTION_METHODS(className) \
127 className::getTypeId() const \
129 return classTypeId; \
132 const SoEnabledElementsList & \
133 className::getEnabledElements() const \
135 return *enabledElements; \
142 #define SO_ACTION_SOURCE(className) \
143 SO__ACTION_VARS(className); \
144 SO__ACTION_METHODS(className)
153 #define SO_ACTION_INIT_CLASS(className, parentClass) \
154 enabledElements = new SoEnabledElementsList(parentClass::enabledElements);\
155 methods = new SoActionMethodList(parentClass::methods); \
156 classTypeId = SoType::createType(parentClass::getClassTypeId(), \
157 SO__QUOTE(className), NULL)
165 #define SO_ACTION_CONSTRUCTOR(className) \
166 traversalMethods = methods
175 #define SO_ACTION_ADD_METHOD(nodeClass, method) \
176 addMethod(nodeClass::getClassTypeId(), method)