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

Go to the source code of this file.

Macros

#define SO_FIELDCONTAINER_ABSTRACT_HEADER(className)
 
#define SO_FIELDCONTAINER_HEADER(className)
 
#define SO__FIELDCONTAINER_CHECK_INIT(className)
 
#define SO__FIELDCONTAINER_CHECK_CONSTRUCT(where)
 
#define SO__FIELDCONTAINER_VARS(className)
 
#define SO_FIELDCONTAINER_ABSTRACT_SOURCE(className)
 
#define SO_FIELDCONTAINER_SOURCE(className)
 
#define SO_FIELDCONTAINER_INIT_CLASS_CHECK_PARENT(className, parentClass)
 
#define SO_FIELDCONTAINER_INIT_CLASS(className, classPrintName, parentClass)
 
#define SO_FIELDCONTAINER_INIT_ABSTRACT_CLASS(className, classPrintName, parentClass)
 
#define SO__FIELDCONTAINER_EXIT_CLASS(className)
 
#define SO_FIELDCONTAINER_IS_FIRST_INSTANCE()    (firstInstance == TRUE)
 
#define SO__FIELDCONTAINER_ADD_MFIELD(fieldName, type)
 
#define SO__FIELDCONTAINER_ADD_FIELD(fieldName, defValue, type)
 
#define SO_FIELDCONTAINER_ADD_FIELD(fieldName, defValue)    SO__FIELDCONTAINER_ADD_FIELD( fieldName, defValue, SoField::EXPOSED_FIELD )
 
#define SO_FIELDCONTAINER_ADD_HIDDEN_FIELD(fieldName, defValue)    SO__FIELDCONTAINER_ADD_FIELD( fieldName, defValue, SoField::INTERNAL_FIELD )
 
#define SO_FIELDCONTAINER_ADD_PRIVATEFIELD(fieldName, defValue)    SO__FIELDCONTAINER_ADD_FIELD( fieldName, defValue, SoField::HIDDEN_FIELD )
 
#define SO_FIELDCONTAINER_SET_SF_ENUM_TYPE(fieldName, enumType)    SO__SF_ENUM_SET_TYPE( fieldName, enumType, "FIELDCONTAINER", fieldData )
 
#define SO_FIELDCONTAINER_CONSTRUCTOR(className)
 
#define SO__FIELDCONTAINER_DEFINE_ENUM_VALUE(enumType, enumValueName, enumValue)
 
#define SO_FIELDCONTAINER_DEFINE_ENUM_VALUE(enumType, enumValue)    SO__FIELDCONTAINER_DEFINE_ENUM_VALUE( enumType, enumValue, enumValue )
 

Macro Definition Documentation

◆ SO__FIELDCONTAINER_ADD_FIELD

#define SO__FIELDCONTAINER_ADD_FIELD (   fieldName,
  defValue,
  type 
)
Value:
classMutex.lock(); \
SO__FIELDCONTAINER_CHECK_CONSTRUCT(__FILE__); \
if (firstInstance) \
fieldData->addField(this, SO__QUOTE(fieldName), &this->fieldName); \
this->fieldName.setValue defValue; \
this->fieldName.setContainer(this); \
this->fieldName.setFieldType(type); \
classMutex.unlock()

Definition at line 255 of file SoSubFieldContainer.h.

◆ SO__FIELDCONTAINER_ADD_MFIELD

#define SO__FIELDCONTAINER_ADD_MFIELD (   fieldName,
  type 
)
Value:
classMutex.lock(); \
SO__FIELDCONTAINER_CHECK_CONSTRUCT(__FILE__); \
if (firstInstance) \
fieldData->addField(this, SO__QUOTE(fieldName), &this->fieldName); \
this->fieldName.setContainer(this); \
this->fieldName.setFieldType(type); \
classMutex.unlock()

Definition at line 245 of file SoSubFieldContainer.h.

◆ SO__FIELDCONTAINER_CHECK_CONSTRUCT

#define SO__FIELDCONTAINER_CHECK_CONSTRUCT (   where)
Value:
if (fieldData == NULL) \
fieldData = new SoFieldData( \
parentFieldData ? *parentFieldData : NULL)
SoFieldData(const SoFieldData *)

Definition at line 101 of file SoSubFieldContainer.h.

◆ SO__FIELDCONTAINER_CHECK_INIT

#define SO__FIELDCONTAINER_CHECK_INIT (   className)
Value:
if (classTypeId.isBad()) \
className::initClass()

Definition at line 96 of file SoSubFieldContainer.h.

◆ SO__FIELDCONTAINER_DEFINE_ENUM_VALUE

#define SO__FIELDCONTAINER_DEFINE_ENUM_VALUE (   enumType,
  enumValueName,
  enumValue 
)
Value:
classMutex.lock(); \
if (firstInstance) \
fieldData->addEnumValue(SO__QUOTE(enumType), \
SO__QUOTE(enumValueName), \
enumValue); \
classMutex.unlock()

Definition at line 295 of file SoSubFieldContainer.h.

◆ SO__FIELDCONTAINER_EXIT_CLASS

#define SO__FIELDCONTAINER_EXIT_CLASS (   className)
Value:
SoType::removeType(classTypeId.getName()); \
classTypeId = SoType::badType(); \
firstInstance = TRUE; \
if (fieldData != NULL) \
{ \
delete fieldData; \
fieldData = NULL; \
} \
parentFieldData = NULL; \
firstInstance = TRUE
#define TRUE
Possible value of SbBool.
Definition SbBase.h:77
static SoType badType()
Returns an always-illegal type.
Definition SoType.h:124

Definition at line 224 of file SoSubFieldContainer.h.

◆ SO__FIELDCONTAINER_VARS

#define SO__FIELDCONTAINER_VARS (   className)
Value:
SbThreadMutex className::classMutex; \
SoType className::classTypeId; \
SbBool className::isBuiltIn = TRUE; \
SoFieldData* className::fieldData = NULL; \
const SoFieldData** className::parentFieldData = NULL; \
SbBool className::firstInstance = TRUE
<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
int SbBool
Boolean type.
Definition SbBase.h:87

Definition at line 112 of file SoSubFieldContainer.h.

◆ SO_FIELDCONTAINER_ABSTRACT_HEADER

#define SO_FIELDCONTAINER_ABSTRACT_HEADER (   className)
Value:
public: \ \
static SoType getClassTypeId(); \ \
virtual SoType getTypeId() const; \
private: \
virtual SbBool getIsBuiltIn() const ; \
virtual const SoFieldData* getFieldData() const; \
static void initClass(); \
static void exitClass(); \
private: \
static const SoFieldData** getFieldDataPtr(); \
private: \
static SbThreadMutex classMutex; \
static SoType classTypeId; \
static SbBool isBuiltIn; \
static SbBool firstInstance; \
static SoFieldData* fieldData; \
static const SoFieldData** parentFieldData
virtual SoType getTypeId() const
Returns the type identifier for this specific instance.

Definition at line 35 of file SoSubFieldContainer.h.

◆ SO_FIELDCONTAINER_ABSTRACT_SOURCE

#define SO_FIELDCONTAINER_ABSTRACT_SOURCE (   className)

Definition at line 121 of file SoSubFieldContainer.h.

◆ SO_FIELDCONTAINER_ADD_FIELD

#define SO_FIELDCONTAINER_ADD_FIELD (   fieldName,
  defValue 
)     SO__FIELDCONTAINER_ADD_FIELD( fieldName, defValue, SoField::EXPOSED_FIELD )

Definition at line 266 of file SoSubFieldContainer.h.

◆ SO_FIELDCONTAINER_ADD_HIDDEN_FIELD

#define SO_FIELDCONTAINER_ADD_HIDDEN_FIELD (   fieldName,
  defValue 
)     SO__FIELDCONTAINER_ADD_FIELD( fieldName, defValue, SoField::INTERNAL_FIELD )

Definition at line 270 of file SoSubFieldContainer.h.

◆ SO_FIELDCONTAINER_ADD_PRIVATEFIELD

#define SO_FIELDCONTAINER_ADD_PRIVATEFIELD (   fieldName,
  defValue 
)     SO__FIELDCONTAINER_ADD_FIELD( fieldName, defValue, SoField::HIDDEN_FIELD )

Definition at line 274 of file SoSubFieldContainer.h.

◆ SO_FIELDCONTAINER_CONSTRUCTOR

#define SO_FIELDCONTAINER_CONSTRUCTOR (   className)
Value:
SoBaseInitializer sbi(this); \
classMutex.lock(); \
SO__FIELDCONTAINER_CHECK_INIT(className); \
if (fieldData == NULL) \
fieldData = new SoFieldData( parentFieldData ? \
(SoFieldData *)*parentFieldData : \
(SoFieldData *)NULL); \
else \
firstInstance = FALSE; \
classMutex.unlock()
#define FALSE
Possible value of SbBool.
Definition SbBase.h:75

Definition at line 282 of file SoSubFieldContainer.h.

◆ SO_FIELDCONTAINER_DEFINE_ENUM_VALUE

#define SO_FIELDCONTAINER_DEFINE_ENUM_VALUE (   enumType,
  enumValue 
)     SO__FIELDCONTAINER_DEFINE_ENUM_VALUE( enumType, enumValue, enumValue )

Definition at line 304 of file SoSubFieldContainer.h.

◆ SO_FIELDCONTAINER_HEADER

#define SO_FIELDCONTAINER_HEADER (   className)
Value:
private: \
static void* createInstance(SoType* dynamicType = NULL)
#define SO_FIELDCONTAINER_ABSTRACT_HEADER(className)

Definition at line 60 of file SoSubFieldContainer.h.

◆ SO_FIELDCONTAINER_INIT_ABSTRACT_CLASS

#define SO_FIELDCONTAINER_INIT_ABSTRACT_CLASS (   className,
  classPrintName,
  parentClass 
)
Value:
classMutex.lock(); \
SO_FIELDCONTAINER_INIT_CLASS_CHECK_PARENT(className, parentClass); \
classTypeId = SoType::createType( parentClass::getClassTypeId(), \
classPrintName, \
NULL, 0 ); \
parentFieldData = parentClass::getFieldDataPtr(); \
classMutex.unlock()

Definition at line 194 of file SoSubFieldContainer.h.

◆ SO_FIELDCONTAINER_INIT_CLASS

#define SO_FIELDCONTAINER_INIT_CLASS (   className,
  classPrintName,
  parentClass 
)
Value:
classMutex.lock(); \
SO_FIELDCONTAINER_INIT_CLASS_CHECK_PARENT(className, parentClass); \
classTypeId = SoType::createType( parentClass::getClassTypeId(), \
classPrintName, \
&className::createInstance, 0 ); \
parentFieldData = parentClass::getFieldDataPtr(); \
classMutex.unlock()

Definition at line 184 of file SoSubFieldContainer.h.

◆ SO_FIELDCONTAINER_INIT_CLASS_CHECK_PARENT

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

Definition at line 173 of file SoSubFieldContainer.h.

◆ SO_FIELDCONTAINER_IS_FIRST_INSTANCE

#define SO_FIELDCONTAINER_IS_FIRST_INSTANCE ( )     (firstInstance == TRUE)

Definition at line 241 of file SoSubFieldContainer.h.

◆ SO_FIELDCONTAINER_SET_SF_ENUM_TYPE

#define SO_FIELDCONTAINER_SET_SF_ENUM_TYPE (   fieldName,
  enumType 
)     SO__SF_ENUM_SET_TYPE( fieldName, enumType, "FIELDCONTAINER", fieldData )

Definition at line 278 of file SoSubFieldContainer.h.

◆ SO_FIELDCONTAINER_SOURCE

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

Definition at line 156 of file SoSubFieldContainer.h.