Go to the documentation of this file.
130#define SO__KIT_CATALOG_HEADER(className) \
132 static SoNodekitCatalog *nodekitCatalog; \
133 static const SoNodekitCatalog **parentNodekitCatalogPtr;\
135 static const SoNodekitCatalog *getClassNodekitCatalog() \
136 { return nodekitCatalog; } \
138 virtual const SoNodekitCatalog *getNodekitCatalog() const; \
140 static const SoNodekitCatalog **getClassNodekitCatalogPtr() \
141 { return (const SoNodekitCatalog **)&nodekitCatalog; }
143#define SO_KIT_HEADER(className) \
144 SO_NODE_HEADER(className); \
145 SO__KIT_CATALOG_HEADER(className)
155#define SO_KIT_CATALOG_ENTRY_HEADER(partName) \
170#define SO__KIT_CATALOG_VARS(className) \
171SoNodekitCatalog *className::nodekitCatalog = NULL; \
172const SoNodekitCatalog **className::parentNodekitCatalogPtr = NULL
179#define SO__KIT_CATALOG_METHODS(className) \
180const SoNodekitCatalog * \
181className::getNodekitCatalog() const \
183 return nodekitCatalog; \
192#define SO_KIT_SOURCE(className) \
193 SO_NODE_SOURCE(className); \
194 SO__KIT_CATALOG_VARS(className); \
195 SO__KIT_CATALOG_METHODS(className)
201#define SO__KIT_INIT_CLASS(className,classPrintName,parentClass) { \
202 SO__NODE_INIT_CLASS(className,classPrintName,parentClass); \
203 int _value_false= 0; \
205 parentNodekitCatalogPtr = parentClass::getClassNodekitCatalogPtr(); \
206 } while (_value_false); \
219#define SO_KIT_INIT_CLASS(className,parentClass,parentPrintClass) { \
220 SO_NODE_INIT_CLASS(className,parentClass,parentPrintClass); \
221 int _value_false= 0; \
223 parentNodekitCatalogPtr = parentClass::getClassNodekitCatalogPtr(); \
224 } while (_value_false); \
238#define SO__KIT_INHERIT_CATALOG(className) { \
240 int _value_false= 0; \
242 if (firstInstance) { \
243 if (parentNodekitCatalogPtr == nullptr) { \
244 nodekitCatalog = new SoNodekitCatalog; \
248 =(*parentNodekitCatalogPtr)->clone(SoType::fromName(SO__QUOTE(className))); \
251 } while (_value_false); \
259#define SO_KIT_CONSTRUCTOR(className) \
260 SO_NODE_CONSTRUCTOR(className); \
261 SO__KIT_INHERIT_CATALOG(className)
263#define SO_KIT_IS_FIRST_INSTANCE() \
264 SO_NODE_IS_FIRST_INSTANCE()
266#define SO_KIT_ADD_FIELD(fieldName,defValue) \
267 SO_NODE_ADD_FIELD(fieldName,defValue)
269#define SO_KIT_DEFINE_ENUM_VALUE(enumType,enumValue) \
270 SO_NODE_DEFINE_ENUM_VALUE(enumType,enumValue)
272#define SO_KIT_SET_MF_ENUM_TYPE(fieldName, enumType) \
273 SO_NODE_SET_MF_ENUM_TYPE(fieldName, enumType)
275#define SO_KIT_SET_SF_ENUM_TYPE(fieldName, enumType) \
276 SO_NODE_SET_SF_ENUM_TYPE(fieldName, enumType)
338#define SO_KIT_ADD_CATALOG_ENTRY(partName, partClassName, nullByDefault, \
339 parentName, rightName, isPublicPart ) \
340 SO_KIT_ADD_FIELD(partName,(NULL)); \
341 if (firstInstance && !nodekitCatalog->addEntry(SO__QUOTE(partName), \
342 SoType::fromName(SO__QUOTE(partClassName)), \
343 SoType::fromName(SO__QUOTE(partClassName)), nullByDefault,\
344 SO__QUOTE(parentName), \
345 SO__QUOTE(rightName), FALSE, SoType::badType(), \
346 SoType::badType(), isPublicPart )) \
387#define SO_KIT_ADD_CATALOG_ABSTRACT_ENTRY(partName, partClassName, \
388 defaultPartClassName, nullByDefault, parentName, \
389 rightName, isPublicPart ) \
390 SO_KIT_ADD_FIELD(partName,(NULL)); \
391 if (firstInstance && !nodekitCatalog->addEntry(SO__QUOTE(partName), \
392 SoType::fromName(SO__QUOTE(partClassName)), \
393 SoType::fromName(SO__QUOTE(defaultPartClassName)), nullByDefault,\
394 SO__QUOTE(parentName), SO__QUOTE(rightName), FALSE, \
395 SoType::badType(), SoType::badType(), isPublicPart )) \
438#define SO_KIT_ADD_CATALOG_LIST_ENTRY(partName, listContainerClassName, \
439 nullByDefault, parentName, rightName, listItemClassName, isPublicPart ) \
440 SO_KIT_ADD_FIELD(partName,(NULL)); \
441 if (firstInstance && !nodekitCatalog->addEntry(SO__QUOTE(partName), \
442 SoNodeKitListPart::getClassTypeId(), \
443 SoNodeKitListPart::getClassTypeId(), nullByDefault, \
444 SO__QUOTE(parentName), SO__QUOTE(rightName), TRUE, \
445 SoType::fromName(SO__QUOTE(listContainerClassName)), \
446 SoType::fromName(SO__QUOTE(listItemClassName)), isPublicPart)) \
475#define SO_KIT_ADD_LIST_ITEM_TYPE(partName, newListItemClassName ) \
476 if (firstInstance) nodekitCatalog->addListItemType(SO__QUOTE(partName), \
477 SoType::fromName(SO__QUOTE(newListItemClassName)) )
521#define SO_KIT_CHANGE_ENTRY_TYPE(partName, newPartClassName, \
522 newDefaultPartClassName) \
523 if (firstInstance) nodekitCatalog->narrowTypes(SO__QUOTE(partName), \
524 SoType::fromName(SO__QUOTE(newPartClassName)), \
525 SoType::fromName(SO__QUOTE(newDefaultPartClassName)))
535#define SO_KIT_CHANGE_NULL_BY_DEFAULT(partName, newNullByDefault) \
536 if (firstInstance) nodekitCatalog->setNullByDefault(SO__QUOTE(partName), \
551#define SO_KIT_INIT_INSTANCE() \
552 createNodekitPartsList(); \