Open Inventor Release 2023.2.3
 
Loading...
Searching...
No Matches
SoSubNode.h File Reference

Go to the source code of this file.

Macros

#define SO__NODE_CHECK_INIT(className)
 
#define SO__NODE_CHECK_CONSTRUCT(where)
 
#define SO_NODE_ABSTRACT_HEADER(className)
 
#define SO_NODE_HEADER(className)
 
#define SO__NODE_ABSTRACT_VARS(className)
 
#define SO__NODE_VARS(className)    SO__NODE_ABSTRACT_VARS(className)
 
#define SO__NODE_ABSTRACT_METHODS(className)
 
#define SO__NODE_METHODS(className)
 
#define SO_NODE_SOURCE(className)
 
#define SO_NODE_ABSTRACT_SOURCE(className)
 
#define SO_NODE_INIT_CLASS_CHECK_PARENT(className, parentClass)
 
#define SO_NODE_INIT_RENDERING_MODE(className, parentClass)
 
#define SO__NODE_INIT_CLASS_INTERNAL(className, classPrintName, parentClass)
 
#define SO__NODE_INIT_CLASS(className, classPrintName, parentClass)    SO__NODE_INIT_CLASS_INTERNAL(className,classPrintName,parentClass)
 
#define SO__NODE_INIT_ABSTRACT_CLASS_INTERNAL(className, classPrintName, parentClass)
 
#define SO__NODE_INIT_ABSTRACT_CLASS(className, classPrintName, parentClass)    SO__NODE_INIT_ABSTRACT_CLASS_INTERNAL(className,classPrintName,parentClass)
 
#define SO__NODE_EXIT_CLASS(className)
 
#define SO_THREAD_NODE_INIT_CLASS(className, structName)
 
#define SO_THREAD_NODE_EXIT_CLASS(className)
 
#define LOCAL_THREAD_VAR(_className_, _structName_, _varName_)
 
#define LOCAL_THREAD_STORAGE(_className_)
 
#define SO_NODE_INIT_CLASS_INTERNAL(className, parentClass, parentPrintClass)
 
#define SO_NODE_INIT_CLASS(className, parentClass, parentPrintClass)
 
#define SO_NODE_INIT_ABSTRACT_CLASS_INTERNAL(className, parentClass, parentPrintClass)
 
#define SO_NODE_INIT_ABSTRACT_CLASS(className, parentClass, parentPrintClass)
 
#define SO_NODE_CONSTRUCTOR(className)
 This is included at the beginning of a constructor, to do required initializations.
 
#define SO_NODE_IS_FIRST_INSTANCE()
 Boolean check that can be used in constructors.
 
#define CHECK_FIELD_INIT(fieldName)
 This adds the info for a field to the SoFieldData and sets the default value for it.
 
#define CHECK_MFIELD_INIT(fieldName)
 
#define SO_NODE_ADD_FIELD(fieldName, defValue)
 
#define SO_NODE_ADD_NAMED_FIELD(fieldName, memberName, defValue)
 
#define SO_NODE_ADD_MFIELD(fieldName)
 
#define SO_NODE_ADD_PRIVATEFIELD(fieldName, defValue)
 
#define SO_NODE_ADD_PRIVATEMFIELD(fieldName)
 
#define SO_NODE_ADD_EXPOSEDFIELD(fieldName, defValue)
 
#define SO_NODE_ADD_EVENTIN(fieldName)
 
#define SO_NODE_ADD_EVENTOUT(fieldName, defValue)
 
#define SO_NODE_ADD_HIDDEN_FIELD(fieldName, defValue)
 
#define SO_NODE_ADD_FIELD_EVENTIN(fieldName, defValue)
 
#define SO_NODE_DEFINE_ENUM_VALUE(enumType, enumValue)
 
#define SO__NODE_DEFINE_ENUM_VALUE(enumType, enumValueName, enumValue)
 

Functions

virtual const SbRenderEngineModegetRenderEngineMode () const
 
static SbRenderEngineModegetClassRenderEngineMode ()
 Returns the Render engine mode supported for this class.
 

Macro Definition Documentation

◆ CHECK_FIELD_INIT

#define CHECK_FIELD_INIT (   fieldName)

This adds the info for a field to the SoFieldData and sets the default value for it.

The parameters are as follows: fieldName: the name of the field (as a member) defValue: the default value enclosed in parentheses

For example,

 SO_NODE_ADD_FIELD(ambientColor, (0.2, 0.2, 0.2));
 SO_NODE_ADD_FIELD(shininess,    (0.0));

adds info about fields named ambientColor and shininess with the given default values.

Definition at line 474 of file SoSubNode.h.

◆ CHECK_MFIELD_INIT

#define CHECK_MFIELD_INIT (   fieldName)

Definition at line 475 of file SoSubNode.h.

◆ LOCAL_THREAD_STORAGE

#define LOCAL_THREAD_STORAGE (   _className_)
Value:
\
GET_THREAD_LOCAL_STORAGE(_className_)

Definition at line 377 of file SoSubNode.h.

◆ LOCAL_THREAD_VAR

#define LOCAL_THREAD_VAR (   _className_,
  _structName_,
  _varName_ 
)
Value:
\
GET_THREAD_LOCAL_VAR(_className_, _structName_, _varName_)

Definition at line 373 of file SoSubNode.h.

◆ SO__NODE_ABSTRACT_METHODS

#define SO__NODE_ABSTRACT_METHODS (   className)
Value:
\
SoType \
className::getTypeId() const \
{ \
return classTypeId; \
} \
\
const SoFieldData * \
className::getFieldData() const \
{ \
classMutex.lock(); \
SO__NODE_CHECK_CONSTRUCT(SO__QUOTE(className)); \
SoFieldData * result = fieldData; \
classMutex.unlock(); \
return result; \
} \
\
SbBool className::getIsBuiltIn() const \
{ \
return isBuiltIn; \
} \
\
const SoFieldData **className::getFieldDataPtr() \
{ \
classMutex.lock(); \
const SoFieldData **result = (const SoFieldData **)&fieldData; \
classMutex.unlock(); \
return result; \
}
SoFieldData(const SoFieldData *)
int lock()
Locks the current thread on this mutex.
int unlock()
Relinquishes ownership of this mutex.
int SbBool
Boolean type.
Definition SbBase.h:87

Definition at line 186 of file SoSubNode.h.

◆ SO__NODE_ABSTRACT_VARS

#define SO__NODE_ABSTRACT_VARS (   className)
Value:
SbThreadMutex className::classMutex; \
SoType className::classTypeId; \
SbBool className::isBuiltIn = FALSE; \
SoFieldData *className::fieldData = NULL; \
const SoFieldData **className::parentFieldData = NULL; \
SbBool className::firstInstance = TRUE; \
SbRenderEngineMode className::s_renderEngineMode;
#define TRUE
Possible value of SbBool.
Definition SbBase.h:77
#define FALSE
Possible value of SbBool.
Definition SbBase.h:75
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Render engine mo...
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Portable mutex c...
Stores runtime type information.
Definition SoType.h:98

Definition at line 166 of file SoSubNode.h.

◆ SO__NODE_CHECK_CONSTRUCT

#define SO__NODE_CHECK_CONSTRUCT (   where)
Value:
{ \
if (fieldData == NULL) { \
fieldData = new SoFieldData(parentFieldData ? *parentFieldData : NULL); \
} \
}

Definition at line 99 of file SoSubNode.h.

◆ SO__NODE_CHECK_INIT

#define SO__NODE_CHECK_INIT (   className)
Value:
{ \
if (classTypeId.isBad()) { \
className::initClass(); \
} \
}
SbBool isBad() const
Returns TRUE if the type is a bad type.

Definition at line 93 of file SoSubNode.h.

◆ SO__NODE_DEFINE_ENUM_VALUE

#define SO__NODE_DEFINE_ENUM_VALUE (   enumType,
  enumValueName,
  enumValue 
)
Value:
{ \
classMutex.lock(); \
SO__NODE_CHECK_CONSTRUCT(__FILE__); \
if (firstInstance) \
fieldData->addEnumValue(SO__QUOTE(enumType), \
enumValueName, \
enumValue); \
classMutex.unlock(); \
}

Definition at line 774 of file SoSubNode.h.

◆ SO__NODE_EXIT_CLASS

#define SO__NODE_EXIT_CLASS (   className)
Value:
SoType::removeType(classTypeId.getName()); \
classTypeId = SoType::badType(); \
if (fieldData != NULL) \
{ \
delete fieldData; \
fieldData = NULL; \
} \
parentFieldData = NULL; \
firstInstance = TRUE
static SoType badType()
Returns an always-illegal type.
Definition SoType.h:124
SbName getName() const
Returns the name associated with a type.

Definition at line 339 of file SoSubNode.h.

◆ SO__NODE_INIT_ABSTRACT_CLASS

#define SO__NODE_INIT_ABSTRACT_CLASS (   className,
  classPrintName,
  parentClass 
)     SO__NODE_INIT_ABSTRACT_CLASS_INTERNAL(className,classPrintName,parentClass)

Definition at line 316 of file SoSubNode.h.

◆ SO__NODE_INIT_ABSTRACT_CLASS_INTERNAL

#define SO__NODE_INIT_ABSTRACT_CLASS_INTERNAL (   className,
  classPrintName,
  parentClass 
)
Value:
classMutex.lock(); \
SO_NODE_INIT_CLASS_CHECK_PARENT(className, parentClass); \
classTypeId = SoType::createType( parentClass::getClassTypeId(), \
classPrintName, \
NULL, \
(short)SoNode::getNextActionMethodIndex()); \
if (parentFieldData == NULL) \
SoNode::incNextActionMethodIndex(); \
parentFieldData = parentClass::getFieldDataPtr(); \
classMutex.unlock();

Definition at line 304 of file SoSubNode.h.

◆ SO__NODE_INIT_CLASS

#define SO__NODE_INIT_CLASS (   className,
  classPrintName,
  parentClass 
)     SO__NODE_INIT_CLASS_INTERNAL(className,classPrintName,parentClass)

Definition at line 301 of file SoSubNode.h.

◆ SO__NODE_INIT_CLASS_INTERNAL

#define SO__NODE_INIT_CLASS_INTERNAL (   className,
  classPrintName,
  parentClass 
)
Value:
classMutex.lock(); \
SO_NODE_INIT_RENDERING_MODE(className, parentClass); \
SO_NODE_INIT_CLASS_CHECK_PARENT(className, parentClass); \
classTypeId = SoType::createType( parentClass::getClassTypeId(), \
classPrintName, \
&className::createInstance, \
(short)SoNode::getNextActionMethodIndex()); \
if (parentFieldData == NULL) \
SoNode::incNextActionMethodIndex(); \
parentFieldData = parentClass::getFieldDataPtr(); \
classMutex.unlock();

Definition at line 288 of file SoSubNode.h.

◆ SO__NODE_METHODS

#define SO__NODE_METHODS (   className)
Value:
\
SO__NODE_ABSTRACT_METHODS(className) \
\
void * \
className::createInstance(SoType *) \
{ \
return (void *)(new className); \
}

Definition at line 223 of file SoSubNode.h.

◆ SO__NODE_VARS

#define SO__NODE_VARS (   className)     SO__NODE_ABSTRACT_VARS(className)

Definition at line 178 of file SoSubNode.h.

◆ SO_NODE_ABSTRACT_HEADER

#define SO_NODE_ABSTRACT_HEADER (   className)
Value:
public: \ \
static SoType getClassTypeId() \
{ return classTypeId; } \ \
virtual SoType getTypeId() const; \ \
virtual SoType getTypeId() const
Returns the type identifier for this specific instance.

Definition at line 118 of file SoSubNode.h.

◆ SO_NODE_ABSTRACT_SOURCE

#define SO_NODE_ABSTRACT_SOURCE (   className)
Value:
SO__NODE_ABSTRACT_METHODS(className)
#define SO__NODE_ABSTRACT_VARS(className)
Definition SoSubNode.h:166

Definition at line 245 of file SoSubNode.h.

◆ SO_NODE_ADD_EVENTIN

#define SO_NODE_ADD_EVENTIN (   fieldName)
Value:
{ \
classMutex.lock(); \
SO__NODE_CHECK_CONSTRUCT(__FILE__); \
if (firstInstance) \
fieldData->addField(this, SO__QUOTE(fieldName), \
&this->fieldName); \
this->fieldName.setContainer(this); \
this->fieldName.setFieldType(SoField::EVENTIN_FIELD); \
classMutex.unlock(); \
}

Definition at line 634 of file SoSubNode.h.

◆ SO_NODE_ADD_EVENTOUT

#define SO_NODE_ADD_EVENTOUT (   fieldName,
  defValue 
)
Value:
{ \
classMutex.lock(); \
SO__NODE_CHECK_CONSTRUCT(__FILE__); \
if (firstInstance) \
fieldData->addField(this, SO__QUOTE(fieldName), \
&this->fieldName); \
this->fieldName.setValue defValue; \
this->fieldName.setContainer(this); \
this->fieldName.setFieldType(SoField::EVENTOUT_FIELD); \
classMutex.unlock(); \
}

Definition at line 658 of file SoSubNode.h.

◆ SO_NODE_ADD_EXPOSEDFIELD

#define SO_NODE_ADD_EXPOSEDFIELD (   fieldName,
  defValue 
)
Value:
{ \
classMutex.lock(); \
SO__NODE_CHECK_CONSTRUCT(__FILE__); \
if (firstInstance) \
fieldData->addField(this, SO__QUOTE(fieldName), \
&this->fieldName); \
this->fieldName.setValue defValue; \
this->fieldName.setContainer(this); \
this->fieldName.setFieldType(SoField::EXPOSED_FIELD); \
classMutex.unlock(); \
}

Definition at line 609 of file SoSubNode.h.

◆ SO_NODE_ADD_FIELD

#define SO_NODE_ADD_FIELD (   fieldName,
  defValue 
)
Value:
{ \
classMutex.lock(); \
SO__NODE_CHECK_CONSTRUCT(__FILE__); \
if (firstInstance) \
fieldData->addField(this, SO__QUOTE(fieldName), \
&this->fieldName); \
this->fieldName.setValue defValue; \
this->fieldName.setContainer(this); \
this->fieldName.setFieldType(SoField::EXPOSED_FIELD); \
CHECK_FIELD_INIT(fieldName); \
classMutex.unlock(); \
}

Definition at line 478 of file SoSubNode.h.

◆ SO_NODE_ADD_FIELD_EVENTIN

#define SO_NODE_ADD_FIELD_EVENTIN (   fieldName,
  defValue 
)
Value:
{ \
classMutex.lock(); \
SO__NODE_CHECK_CONSTRUCT(__FILE__); \
if (firstInstance) \
fieldData->addField(this, SO__QUOTE(fieldName), \
&this->fieldName); \
this->fieldName.setValue defValue; \
this->fieldName.setContainer(this); \
this->fieldName.setFieldType(SoField::FIELD_EVENTIN_FIELD); \
classMutex.unlock(); \
}

Definition at line 706 of file SoSubNode.h.

◆ SO_NODE_ADD_HIDDEN_FIELD

#define SO_NODE_ADD_HIDDEN_FIELD (   fieldName,
  defValue 
)
Value:
{ \
classMutex.lock(); \
SO__NODE_CHECK_CONSTRUCT(__FILE__); \
if (firstInstance) \
fieldData->addField(this, SO__QUOTE(fieldName), \
&this->fieldName); \
this->fieldName.setValue defValue; \
this->fieldName.setContainer(this); \
this->fieldName.setFieldType(SoField::INTERNAL_FIELD); \
classMutex.unlock(); \
}

Definition at line 683 of file SoSubNode.h.

◆ SO_NODE_ADD_MFIELD

#define SO_NODE_ADD_MFIELD (   fieldName)
Value:
{ \
classMutex.lock(); \
SO__NODE_CHECK_CONSTRUCT(__FILE__); \
if (firstInstance) \
fieldData->addField(this, SO__QUOTE(fieldName), \
&this->fieldName); \
this->fieldName.setContainer(this); \
this->fieldName.setFieldType(SoField::EXPOSED_FIELD); \
CHECK_MFIELD_INIT(fieldName); \
classMutex.unlock(); \
}

Definition at line 524 of file SoSubNode.h.

◆ SO_NODE_ADD_NAMED_FIELD

#define SO_NODE_ADD_NAMED_FIELD (   fieldName,
  memberName,
  defValue 
)
Value:
{ \
classMutex.lock(); \
SO__NODE_CHECK_CONSTRUCT(__FILE__); \
if (firstInstance) \
fieldData->addField(this, SO__QUOTE(fieldName), \
&this->memberName); \
this->memberName.setValue defValue; \
this->memberName.setContainer(this); \
this->memberName.setFieldType(SoField::EXPOSED_FIELD); \
classMutex.unlock(); \
}

Definition at line 496 of file SoSubNode.h.

◆ SO_NODE_ADD_PRIVATEFIELD

#define SO_NODE_ADD_PRIVATEFIELD (   fieldName,
  defValue 
)
Value:
{ \
classMutex.lock(); \
SO__NODE_CHECK_CONSTRUCT(__FILE__); \
if (firstInstance) \
fieldData->addField(this, SO__QUOTE(fieldName), &this->fieldName); \
this->fieldName.setValue defValue; \
this->fieldName.setContainer(this); \
this->fieldName.setFieldType(SoField::HIDDEN_FIELD); \
classMutex.unlock(); \
}

Definition at line 552 of file SoSubNode.h.

◆ SO_NODE_ADD_PRIVATEMFIELD

#define SO_NODE_ADD_PRIVATEMFIELD (   fieldName)
Value:
{ \
classMutex.lock(); \
SO__NODE_CHECK_CONSTRUCT(__FILE__); \
if (firstInstance) \
fieldData->addField(this, SO__QUOTE(fieldName), \
&this->fieldName); \
this->fieldName.setContainer(this); \
this->fieldName.setFieldType(SoField::HIDDEN_FIELD); \
classMutex.unlock(); \
}

Definition at line 579 of file SoSubNode.h.

◆ SO_NODE_CONSTRUCTOR

#define SO_NODE_CONSTRUCTOR (   className)
Value:
SoBaseInitializer sbi(this); \
classMutex.lock(); \
SO__NODE_CHECK_INIT(className); \
if (fieldData == NULL) \
fieldData = new SoFieldData(parentFieldData ? \
(SoFieldData *)*parentFieldData : \
(SoFieldData *)NULL); \
else \
firstInstance = FALSE; \
classMutex.unlock();

This is included at the beginning of a constructor, to do required initializations.

Definition at line 427 of file SoSubNode.h.

◆ SO_NODE_DEFINE_ENUM_VALUE

#define SO_NODE_DEFINE_ENUM_VALUE (   enumType,
  enumValue 
)
Value:
{ \
classMutex.lock(); \
SO__NODE_CHECK_CONSTRUCT(__FILE__); \
if (firstInstance) \
fieldData->addEnumValue(SO__QUOTE(enumType), \
SO__QUOTE(enumValue), \
enumValue); \
classMutex.unlock(); \
}

Definition at line 740 of file SoSubNode.h.

◆ SO_NODE_HEADER

#define SO_NODE_HEADER (   className)
Value:
static void *createInstance(SoType* dynamicType = NULL)
#define SO_NODE_ABSTRACT_HEADER(className)
Definition SoSubNode.h:118

Definition at line 151 of file SoSubNode.h.

◆ SO_NODE_INIT_ABSTRACT_CLASS

#define SO_NODE_INIT_ABSTRACT_CLASS (   className,
  parentClass,
  parentPrintClass 
)
Value:
\
SO_NODE_INIT_ABSTRACT_CLASS_INTERNAL(className,parentClass,parentPrintClass)

Definition at line 419 of file SoSubNode.h.

◆ SO_NODE_INIT_ABSTRACT_CLASS_INTERNAL

#define SO_NODE_INIT_ABSTRACT_CLASS_INTERNAL (   className,
  parentClass,
  parentPrintClass 
)
Value:
classMutex.lock(); \
SO_NODE_INIT_RENDERING_MODE(className,parentClass); \
SO_NODE_INIT_CLASS_CHECK_PARENT(className, parentClass); \
classTypeId = SoType::createType( SoType::fromName(parentPrintClass), \
SO__QUOTE(className), \
NULL, \
(short)SoNode::getNextActionMethodIndex()); \
if (parentFieldData == NULL) \
SoNode::incNextActionMethodIndex(); \
parentFieldData = parentClass::getFieldDataPtr(); \
classMutex.unlock();
static SoType fromName(const SbName &name)
Returns the type associated with the given name.

Definition at line 406 of file SoSubNode.h.

◆ SO_NODE_INIT_CLASS

#define SO_NODE_INIT_CLASS (   className,
  parentClass,
  parentPrintClass 
)
Value:
\
SO_NODE_INIT_CLASS_INTERNAL(className,parentClass,parentPrintClass)

Definition at line 402 of file SoSubNode.h.

◆ SO_NODE_INIT_CLASS_CHECK_PARENT

#define SO_NODE_INIT_CLASS_CHECK_PARENT (   className,
  parentClass 
)
Value:
if (parentClass::getClassTypeId().isBad()) \
parentClass::initClass()

Definition at line 264 of file SoSubNode.h.

◆ SO_NODE_INIT_CLASS_INTERNAL

#define SO_NODE_INIT_CLASS_INTERNAL (   className,
  parentClass,
  parentPrintClass 
)
Value:
classMutex.lock(); \
SO_NODE_INIT_RENDERING_MODE(className, parentClass); \
SO_NODE_INIT_CLASS_CHECK_PARENT(className, parentClass); \
classTypeId = SoType::createType( SoType::fromName(parentPrintClass), \
SO__QUOTE(className), \
&className::createInstance, \
(short)SoNode::getNextActionMethodIndex()); \
if (parentFieldData == NULL) \
SoNode::incNextActionMethodIndex(); \
parentFieldData = parentClass::getFieldDataPtr(); \
classMutex.unlock();

Definition at line 389 of file SoSubNode.h.

◆ SO_NODE_INIT_RENDERING_MODE

#define SO_NODE_INIT_RENDERING_MODE (   className,
  parentClass 
)
Value:
if ( className::getClassRenderEngineMode().isNotDefined() ) \
{ \
if (parentClass::getClassRenderEngineMode().isChildrenInherit()) \
s_renderEngineMode = parentClass::getClassRenderEngineMode(); \
else \
SbRenderEngineMode::postInitWarning( OIV_FUNCTION); \
}
#define OIV_FUNCTION
Definition port.h:34

Definition at line 278 of file SoSubNode.h.

◆ SO_NODE_IS_FIRST_INSTANCE

#define SO_NODE_IS_FIRST_INSTANCE ( )
Value:
\
(firstInstance == TRUE)

Boolean check that can be used in constructors.

Definition at line 443 of file SoSubNode.h.

◆ SO_NODE_SOURCE

#define SO_NODE_SOURCE (   className)
Value:
SO__NODE_METHODS(className)
#define SO__NODE_VARS(className)
Definition SoSubNode.h:178

Definition at line 241 of file SoSubNode.h.

◆ SO_THREAD_NODE_EXIT_CLASS

#define SO_THREAD_NODE_EXIT_CLASS (   className)
Value:
\
SB_THREAD_EXIT_CLASS(className)

Definition at line 369 of file SoSubNode.h.

◆ SO_THREAD_NODE_INIT_CLASS

#define SO_THREAD_NODE_INIT_CLASS (   className,
  structName 
)
Value:
\
SB_THREAD_INIT_CLASS(className,structName)

Definition at line 365 of file SoSubNode.h.

Function Documentation

◆ getClassRenderEngineMode()

static SbRenderEngineMode & getClassRenderEngineMode ( )
static

Returns the Render engine mode supported for this class.

Definition at line 131 of file SoSubNode.h.

◆ getRenderEngineMode()

virtual const SbRenderEngineMode & getRenderEngineMode ( ) const
virtual

Definition at line 127 of file SoSubNode.h.