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

Go to the source code of this file.

Macros

#define SO__FIELD_HEADER(className)
 
#define SO__SFIELD_RW_HEADER(className)
 
#define SO__MFIELD_RW_HEADER(className)
 
#define SO_FIELD_INIT_CLASS_CHECK_PARENT(className, parentClass)
 
#define SO__FIELD_INIT_CLASS_INTERNAL(className, classPrintName, parentClass)
 
#define SO__FIELD_INIT_CLASS(className, classPrintName, parentClass)    SO__FIELD_INIT_CLASS_INTERNAL(className,classPrintName,parentClass);
 
#define SO__FIELD_INIT_ABSTRACT_CLASS_INTERNAL(className, classPrintName, parentClass)
 
#define SO__FIELD_INIT_ABSTRACT_CLASS(className, classPrintName, parentClass)    SO__FIELD_INIT_ABSTRACT_CLASS_INTERNAL(className,classPrintName,parentClass);
 
#define SO__FIELD_EXIT_CLASS(className)
 
#define SO__FIELD_ID_ABSTRACT_SOURCE(className)
 
#define SO__FIELD_ID_SOURCE(className)
 
#define SO__FIELD_EQ_SAME_SOURCE(className)
 
#define SO_SFIELD_REQUIRED_HEADER(className)    SO__FIELD_HEADER(className)
 
#define SO_SFIELD_CONSTRUCTOR_HEADER(className)
 
#define SO_SFIELD_VALUE_HEADER(className, valueType, valueRef)
 
#define SO_SFIELD_DERIVED_VALUE_HEADER(className, valueType, valueRef)
 
#define SO_SFIELD_HEADER(className, valueType, valueRef)
 
#define SO_SFIELD_DERIVED_HEADER(className, valueType, valueRef)
 
#define SO_MFIELD_REQUIRED_HEADER(className)    SO__FIELD_HEADER(className)
 
#define SO_MFIELD_CONSTRUCTOR_HEADER(className)
 
#define SO_MFIELD_VALUE_HEADER(className, valueType, valueRef)
 
#define SO_MFIELD_DERIVED_VALUE_HEADER(className, valueType, valueRef)
 
#define SO_FIELD_SUPPORT_MEMOBJ()
 
#define SO_MFIELD_EDITING_HEADER(className, valueType)
 
#define SO_MFIELD_HEADER(className, valueType, valueRef)
 
#define SO_MFIELD_DERIVED_HEADER(className, valueType, valueRef)
 
#define SO_SFIELD_INIT_CLASS(className, parentClass)    SO__FIELD_INIT_CLASS(className, SO__QUOTE(className), parentClass);
 
#define SO_SFIELD_EXIT_CLASS(className)    SO__FIELD_EXIT_CLASS(className)
 
#define SO_SFIELD_REQUIRED_SOURCE(className)
 
#define SO_FIELD_CHECK_INIT(className)
 
#define SO_SFIELD_CONSTRUCTOR_SOURCE(className)
 
#define SO_SFIELD_VALUE_SOURCE(className, valueType, valueRef)
 
#define SO_SFIELD_SOURCE(className, valueType, valueRef)
 
#define SO_SFIELD_DERIVED_CONSTRUCTOR_SOURCE(className)
 
#define SO_SFIELD_DERIVED_SOURCE(className, valueType, valueRef)
 
#define SO_MFIELD_INIT_CLASS(className, parentClass)    SO__FIELD_INIT_CLASS(className, SO__QUOTE(className), parentClass);
 
#define SO_MFIELD_EXIT_CLASS(className)    SO__FIELD_EXIT_CLASS(className)
 
#define SO_MFIELD_REQUIRED_SOURCE(className)
 
#define SO_MFIELD_CONSTRUCTOR_SOURCE(className)
 
#define SO_MFIELD_DERIVED_CONSTRUCTOR_SOURCE(className)
 
#define SO_MFIELD_VALUE_SOURCE(className, valueType, valueRef)
 
#define SO_MFIELD_ALLOC_SOURCE(className, valueType)
 
#define SO_MFIELD_MALLOC_SOURCE(className, valueType)
 
#define SO_MFIELD_SOURCE(className, valueType, valueRef)
 
#define SO_MFIELD_SOURCE_MALLOC(className, valueType, valueRef)
 
#define SO_MFIELD_DERIVED_SOURCE(className, valueType, valueRef)
 
#define SO_MFIELD_SETVALUESPOINTER_HEADER(userType)
 
#define SO_MFIELD_SETVALUESPOINTER_SOURCE(className, valueType, userType)
 

Functions

valueRef getValue () const
 
void setValue (valueRef newValue)
 Sets this field to newValue.
 
valueRef operator= (valueRef newValue)
 Sets this field to newValue.
 
int operator== (const className &f) const
 Returns TRUE if otherField is of the same type and has the same value as this field.
 
int operator!= (const className &f) const
 Returns FALSE if otherField is of the same type and has the same value as this field.
 
virtual size_t getValueSize () const
 Gets the size of the value.
 

Macro Definition Documentation

◆ SO__FIELD_EQ_SAME_SOURCE

#define SO__FIELD_EQ_SAME_SOURCE (   className)
Value:
\
void \
className::copyFrom(const SoField &f) \
{ \
*this = * (const className *) &f; \
} \
\
SbBool \
className::isSame(const SoField &f) const \
{ \
return (getTypeId() == f.getTypeId() && \
(*this) == (const className &) f); \
}
virtual SoType getTypeId() const
Returns the type identifier for this specific instance.
Base class for all fields.
Definition SoField.h:234

Definition at line 176 of file SoSubField.h.

◆ SO__FIELD_EXIT_CLASS

#define SO__FIELD_EXIT_CLASS (   className)
Value:
SoType::removeType(classTypeId.getName()); \
classTypeId = SoType::badType()
static SoType badType()
Returns an always-illegal type.
Definition SoType.h:124

Definition at line 146 of file SoSubField.h.

◆ SO__FIELD_HEADER

#define SO__FIELD_HEADER (   className)
Value:
public: \ \
virtual SoType getTypeId() const; \ \
static SoType getClassTypeId(); \
\ \
const className & operator =(const className &f); \
\
private:\
/* Copy from another field of unknown type (assumed to be same type) */ \
virtual void copyFrom(const SoField &f); \
\
static void * createInstance(SoType* dynamicType = NULL); \
\
/* Returns TRUE if fields are same type and have same values */ \
virtual SbBool isSame(const SoField &f) const; \
\
private: \
static SoType classTypeId
valueRef operator=(valueRef newValue)
Sets this field to newValue.
Definition SoSubField.h:242
Stores runtime type information.
Definition SoType.h:98
int SbBool
Boolean type.
Definition SbBase.h:87

Definition at line 64 of file SoSubField.h.

◆ SO__FIELD_ID_ABSTRACT_SOURCE

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

Definition at line 151 of file SoSubField.h.

◆ SO__FIELD_ID_SOURCE

#define SO__FIELD_ID_SOURCE (   className)
Value:
void * \
className::createInstance(SoType *) \
{ \
return (void *)(new className); \
}
#define SO__FIELD_ID_ABSTRACT_SOURCE(className)
Definition SoSubField.h:151

Definition at line 167 of file SoSubField.h.

◆ SO__FIELD_INIT_ABSTRACT_CLASS

#define SO__FIELD_INIT_ABSTRACT_CLASS (   className,
  classPrintName,
  parentClass 
)     SO__FIELD_INIT_ABSTRACT_CLASS_INTERNAL(className,classPrintName,parentClass);

Definition at line 131 of file SoSubField.h.

◆ SO__FIELD_INIT_ABSTRACT_CLASS_INTERNAL

#define SO__FIELD_INIT_ABSTRACT_CLASS_INTERNAL (   className,
  classPrintName,
  parentClass 
)
Value:
classTypeId = SoType::createType(parentClass::getClassTypeId(), \
classPrintName, \
NULL)
#define SO_FIELD_INIT_CLASS_CHECK_PARENT(className, parentClass)
Definition SoSubField.h:111

Definition at line 125 of file SoSubField.h.

◆ SO__FIELD_INIT_CLASS

#define SO__FIELD_INIT_CLASS (   className,
  classPrintName,
  parentClass 
)     SO__FIELD_INIT_CLASS_INTERNAL(className,classPrintName,parentClass);

Definition at line 122 of file SoSubField.h.

◆ SO__FIELD_INIT_CLASS_INTERNAL

#define SO__FIELD_INIT_CLASS_INTERNAL (   className,
  classPrintName,
  parentClass 
)
Value:
classTypeId = SoType::createType(parentClass::getClassTypeId(), \
classPrintName, \
&className::createInstance)

Definition at line 116 of file SoSubField.h.

◆ SO__MFIELD_RW_HEADER

#define SO__MFIELD_RW_HEADER (   className)
Value:
private: \
/* Reads indexed value of field from file */ \
virtual SbBool read1Value(SoInput *in, int index); \
\
/* Writes one (indexed) value to file */ \
virtual void write1Value(SoOutput *out, int index) const
Used to read Open Inventor data files.
Definition SoInput.h:363
Used to write Open Inventor data files.
Definition SoOutput.h:185

Definition at line 94 of file SoSubField.h.

◆ SO__SFIELD_RW_HEADER

#define SO__SFIELD_RW_HEADER (   className)
Value:
private: \
/* Reads value of field from file */ \
virtual SbBool readValue(SoInput *in); \
\
/* Writes value of field to file */ \
virtual void writeValue(SoOutput *out) const

Definition at line 86 of file SoSubField.h.

◆ SO_FIELD_CHECK_INIT

#define SO_FIELD_CHECK_INIT (   className)
Value:
{ \
if (classTypeId.isBad()) { \
className::initClass(); \
} \
}

Definition at line 572 of file SoSubField.h.

◆ SO_FIELD_INIT_CLASS_CHECK_PARENT

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

Definition at line 111 of file SoSubField.h.

◆ SO_FIELD_SUPPORT_MEMOBJ

#define SO_FIELD_SUPPORT_MEMOBJ ( )
Value:
private: \
virtual bool isEnabledMemObj() { return true; } \
virtual SoMemoryObject* getMemObj() { return m_memObj; } \
virtual void setMemObj( SoMemoryObject* memObj ) { m_memObj = memObj; }
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Handle memory bu...

Definition at line 462 of file SoSubField.h.

◆ SO_MFIELD_ALLOC_SOURCE

#define SO_MFIELD_ALLOC_SOURCE (   className,
  valueType 
)

Definition at line 855 of file SoSubField.h.

◆ SO_MFIELD_CONSTRUCTOR_HEADER

#define SO_MFIELD_CONSTRUCTOR_HEADER (   className)
Value:
public: \ \
className(); \
\ \
virtual ~className()

Definition at line 320 of file SoSubField.h.

◆ SO_MFIELD_CONSTRUCTOR_SOURCE

#define SO_MFIELD_CONSTRUCTOR_SOURCE (   className)
Value:
\
className::className() \
{ \
SO_FIELD_CHECK_INIT(className) \
values = NULL; \
resetChangedStatus (); \
m_memObj = NULL; \
} \
\
className::~className() \
{ \
deleteAllValues(); \
\
}

Definition at line 715 of file SoSubField.h.

◆ SO_MFIELD_DERIVED_CONSTRUCTOR_SOURCE

#define SO_MFIELD_DERIVED_CONSTRUCTOR_SOURCE (   className)
Value:
\
className::className() \
{ \
SO_FIELD_CHECK_INIT(className) \
resetChangedStatus (); \
} \
\
className::~className() \
{ \
}

Definition at line 739 of file SoSubField.h.

◆ SO_MFIELD_DERIVED_HEADER

#define SO_MFIELD_DERIVED_HEADER (   className,
  valueType,
  valueRef 
)
Value:
SO_MFIELD_CONSTRUCTOR_HEADER(className); \
SO_MFIELD_DERIVED_VALUE_HEADER(className, valueType, valueRef)
#define SO_MFIELD_REQUIRED_HEADER(className)
Definition SoSubField.h:311

Definition at line 516 of file SoSubField.h.

◆ SO_MFIELD_DERIVED_SOURCE

#define SO_MFIELD_DERIVED_SOURCE (   className,
  valueType,
  valueRef 
)
Value:
SO_MFIELD_DERIVED_CONSTRUCTOR_SOURCE(className)
#define SO_MFIELD_REQUIRED_SOURCE(className)
Definition SoSubField.h:692

Definition at line 1006 of file SoSubField.h.

◆ SO_MFIELD_DERIVED_VALUE_HEADER

#define SO_MFIELD_DERIVED_VALUE_HEADER (   className,
  valueType,
  valueRef 
)
Value:
public: \ \
valueRef operator =(valueRef newValue) \
{ setValue(newValue); return newValue; }
#define SO__MFIELD_RW_HEADER(className)
Definition SoSubField.h:94
void setValue(valueRef newValue)
Sets this field to newValue.

Definition at line 455 of file SoSubField.h.

◆ SO_MFIELD_EDITING_HEADER

#define SO_MFIELD_EDITING_HEADER (   className,
  valueType 
)
Value:
\ \ \ \ \ \ \

Definition at line 475 of file SoSubField.h.

◆ SO_MFIELD_EXIT_CLASS

#define SO_MFIELD_EXIT_CLASS (   className)     SO__FIELD_EXIT_CLASS(className)

Definition at line 682 of file SoSubField.h.

◆ SO_MFIELD_HEADER

#define SO_MFIELD_HEADER (   className,
  valueType,
  valueRef 
)
Value:
SO_MFIELD_CONSTRUCTOR_HEADER(className); \
SO_MFIELD_EDITING_HEADER(className, valueType); \
SO_MFIELD_VALUE_HEADER(className, valueType, valueRef)

Definition at line 502 of file SoSubField.h.

◆ SO_MFIELD_INIT_CLASS

#define SO_MFIELD_INIT_CLASS (   className,
  parentClass 
)     SO__FIELD_INIT_CLASS(className, SO__QUOTE(className), parentClass);

Definition at line 679 of file SoSubField.h.

◆ SO_MFIELD_MALLOC_SOURCE

#define SO_MFIELD_MALLOC_SOURCE (   className,
  valueType 
)

Definition at line 906 of file SoSubField.h.

◆ SO_MFIELD_REQUIRED_HEADER

#define SO_MFIELD_REQUIRED_HEADER (   className)     SO__FIELD_HEADER(className)

Definition at line 311 of file SoSubField.h.

◆ SO_MFIELD_REQUIRED_SOURCE

#define SO_MFIELD_REQUIRED_SOURCE (   className)
Value:
\
SO__FIELD_ID_SOURCE(className) \
SO__FIELD_EQ_SAME_SOURCE(className) \
\
const className & \
{ \
if (f.getNum() < getNum()) \
deleteAllValues(); \
setValues(0, f.getNum(), f.getValues(0)); \
return *this; \
}
int getNum() const
Returns the number of tangents in the cache.
className & operator=(const className &other_array)
Copy from other_array.

Definition at line 692 of file SoSubField.h.

◆ SO_MFIELD_SETVALUESPOINTER_HEADER

#define SO_MFIELD_SETVALUESPOINTER_HEADER (   userType)
Value:
public: \ \ \ \ \ \ \ \ \ \ \ \ \ \

Definition at line 1016 of file SoSubField.h.

◆ SO_MFIELD_SETVALUESPOINTER_SOURCE

#define SO_MFIELD_SETVALUESPOINTER_SOURCE (   className,
  valueType,
  userType 
)
Value:
void \
className::setValuesPointer(int myNum, userType const*userData) \
{ \
if (myNum > 0 && userData != NULL) { \
if ( getUserDataIsUsed() && userData == (userType const*)values ) { \
} \
else if (getNum() > 0) { \
makeRoom(0); \
} \
values = (valueType *)userData; \
setUserDataIsUsed(true); \
num = myNum; \
valueChanged(0, num); \
} \
} \
\
void \
className::setValuesPointer(int myNum, userType *userData) \
{ \
setValuesPointer(myNum, (userType const*)userData); \
}

◆ SO_MFIELD_SOURCE

#define SO_MFIELD_SOURCE (   className,
  valueType,
  valueRef 
)
Value:
SO_MFIELD_CONSTRUCTOR_SOURCE(className) \
SO_MFIELD_VALUE_SOURCE(className, valueType, valueRef) \
SO_MFIELD_ALLOC_SOURCE(className, valueType)

Definition at line 979 of file SoSubField.h.

◆ SO_MFIELD_SOURCE_MALLOC

#define SO_MFIELD_SOURCE_MALLOC (   className,
  valueType,
  valueRef 
)
Value:
SO_MFIELD_CONSTRUCTOR_SOURCE(className) \
SO_MFIELD_VALUE_SOURCE(className, valueType, valueRef) \
SO_MFIELD_MALLOC_SOURCE(className, valueType)

Definition at line 992 of file SoSubField.h.

◆ SO_MFIELD_VALUE_HEADER

#define SO_MFIELD_VALUE_HEADER (   className,
  valueType,
  valueRef 
)
Value:
\
public: \ \

Definition at line 335 of file SoSubField.h.

◆ SO_MFIELD_VALUE_SOURCE

#define SO_MFIELD_VALUE_SOURCE (   className,
  valueType,
  valueRef 
)

Definition at line 758 of file SoSubField.h.

◆ SO_SFIELD_CONSTRUCTOR_HEADER

#define SO_SFIELD_CONSTRUCTOR_HEADER (   className)
Value:
public: \ \
className(); \
\ \
virtual ~className()

Definition at line 213 of file SoSubField.h.

◆ SO_SFIELD_CONSTRUCTOR_SOURCE

#define SO_SFIELD_CONSTRUCTOR_SOURCE (   className)
Value:
\
className::className() \
: value() \
{ \
SO_FIELD_CHECK_INIT(className) \
} \
className::~className() \
{ \
}

Definition at line 585 of file SoSubField.h.

◆ SO_SFIELD_DERIVED_CONSTRUCTOR_SOURCE

#define SO_SFIELD_DERIVED_CONSTRUCTOR_SOURCE (   className)
Value:
\
className::className() \
{ \
SO_FIELD_CHECK_INIT(className) \
} \
className::~className() \
{ \
}

Definition at line 642 of file SoSubField.h.

◆ SO_SFIELD_DERIVED_HEADER

#define SO_SFIELD_DERIVED_HEADER (   className,
  valueType,
  valueRef 
)
Value:
SO_SFIELD_CONSTRUCTOR_HEADER(className); \
SO_SFIELD_DERIVED_VALUE_HEADER(className, valueType, valueRef)
#define SO_SFIELD_REQUIRED_HEADER(className)
Definition SoSubField.h:204

Definition at line 293 of file SoSubField.h.

◆ SO_SFIELD_DERIVED_SOURCE

#define SO_SFIELD_DERIVED_SOURCE (   className,
  valueType,
  valueRef 
)
Value:
SO_SFIELD_DERIVED_CONSTRUCTOR_SOURCE(className)
#define SO_SFIELD_REQUIRED_SOURCE(className)
Definition SoSubField.h:548

Definition at line 661 of file SoSubField.h.

◆ SO_SFIELD_DERIVED_VALUE_HEADER

#define SO_SFIELD_DERIVED_VALUE_HEADER (   className,
  valueType,
  valueRef 
)
Value:
public: \ \
valueRef operator =(valueRef newValue) \
{ setValue(newValue); return (valueRef)value; }
#define SO__SFIELD_RW_HEADER(className)
Definition SoSubField.h:86

Definition at line 266 of file SoSubField.h.

◆ SO_SFIELD_EXIT_CLASS

#define SO_SFIELD_EXIT_CLASS (   className)     SO__FIELD_EXIT_CLASS(className)

Definition at line 538 of file SoSubField.h.

◆ SO_SFIELD_HEADER

#define SO_SFIELD_HEADER (   className,
  valueType,
  valueRef 
)
Value:
SO_SFIELD_CONSTRUCTOR_HEADER(className); \
SO_SFIELD_VALUE_HEADER(className, valueType, valueRef)

Definition at line 280 of file SoSubField.h.

◆ SO_SFIELD_INIT_CLASS

#define SO_SFIELD_INIT_CLASS (   className,
  parentClass 
)     SO__FIELD_INIT_CLASS(className, SO__QUOTE(className), parentClass);

Definition at line 535 of file SoSubField.h.

◆ SO_SFIELD_REQUIRED_HEADER

#define SO_SFIELD_REQUIRED_HEADER (   className)     SO__FIELD_HEADER(className)

Definition at line 204 of file SoSubField.h.

◆ SO_SFIELD_REQUIRED_SOURCE

#define SO_SFIELD_REQUIRED_SOURCE (   className)
Value:
\
SO__FIELD_ID_SOURCE(className)/*;*/ \
SO__FIELD_EQ_SAME_SOURCE(className) \
\
const className & \
{ \
setValue(f.getValue()); \
return *this; \
}

Definition at line 548 of file SoSubField.h.

◆ SO_SFIELD_SOURCE

#define SO_SFIELD_SOURCE (   className,
  valueType,
  valueRef 
)
Value:
SO_SFIELD_CONSTRUCTOR_SOURCE(className)/*;*/ \
SO_SFIELD_VALUE_SOURCE(className, valueType, valueRef)

Definition at line 630 of file SoSubField.h.

◆ SO_SFIELD_VALUE_HEADER

#define SO_SFIELD_VALUE_HEADER (   className,
  valueType,
  valueRef 
)
Value:
\
public: \ \

Definition at line 228 of file SoSubField.h.

◆ SO_SFIELD_VALUE_SOURCE

#define SO_SFIELD_VALUE_SOURCE (   className,
  valueType,
  valueRef 
)
Value:
\
void \
className::setValue(valueRef newValue) \
{ \
/*If container is NULL, we are doing the first init, so don't check for equality */ \
/*because value has never been initialized */ \
if ( getSameValueNotificationEnabled() || getContainer() == NULL || !(value==newValue) ) \
{ \
value = newValue; \
valueChanged(); \
} \
} \
\
int \
className::operator ==(const className &f) const \
{ \
return getValue() == f.getValue(); \
}
valueRef getValue() const
Definition SoSubField.h:234

Definition at line 603 of file SoSubField.h.

Function Documentation

◆ getValue()

valueRef getValue ( ) const

Definition at line 234 of file SoSubField.h.

◆ getValueSize()

size_t getValueSize ( ) const
virtual

Gets the size of the value.

Definition at line 253 of file SoSubField.h.

◆ operator!=()

int operator!= ( const className f) const

Returns FALSE if otherField is of the same type and has the same value as this field.

Returns TRUE if all of the values of this field do not equal.

those of the given f. If the fields are different types TRUE will always be returned.

Definition at line 249 of file SoSubField.h.

◆ operator=()

valueRef operator= ( valueRef  newValue)

Sets this field to newValue.

Sets the first value in the array to newValue, and deletes.

the second and subsequent values. If field's values are stored in an user data array, this array is no more used.

Definition at line 242 of file SoSubField.h.

◆ operator==()

int operator== ( const className f) const

Returns TRUE if otherField is of the same type and has the same value as this field.

Returns TRUE if all of the values of this field equal those of.

the given f. If the fields are different types FALSE will always be returned.

◆ setValue()

void setValue ( valueRef  newValue)

Sets this field to newValue.

Sets the first value in the array to newValue, and deletes.

the second and subsequent values. If field's values are stored in an user data array, this array is no more used.