#include <Inventor/SbBasic.h>
#include <Inventor/SbName.h>
#include <Inventor/C/tidbits.h>
#include <assert.h>
Go to the source code of this file.
Defines | |
#define | PRIVATE_EQUALITY_SOURCE(_class_) |
#define | PRIVATE_FIELD_INIT_CLASS(_class_, _classname_, _parent_, _createfunc_) |
#define | PRIVATE_MFIELD_IO_HEADER() |
#define | PRIVATE_SFIELD_IO_HEADER() |
#define | PRIVATE_TYPEID_SOURCE(_class_) |
#define | SO_MFIELD_ALLOC_SOURCE(_class_, _valtype_) |
#define | SO_MFIELD_CONSTRUCTOR_SOURCE(_class_) |
#define | SO_MFIELD_DERIVED_CONSTRUCTOR_SOURCE(_class_) |
#define | SO_MFIELD_DERIVED_HEADER(_class_, _valtype_, _valref_) |
#define | SO_MFIELD_DERIVED_SOURCE(_class_, _valtype_, _valref_) |
#define | SO_MFIELD_DERIVED_VALUE_HEADER(_class_, _valtype_, _valref_) |
#define | SO_MFIELD_HEADER(_class_, _valtype_, _valref_) |
#define | SO_MFIELD_INIT_CLASS(_class_, _parent_) SO_SFIELD_INIT_CLASS(_class_, _parent_) |
#define | SO_MFIELD_MALLOC_SOURCE(_class_, _valtype_) |
#define | SO_MFIELD_REQUIRED_SOURCE(_class_) |
#define | SO_MFIELD_SETVALUESPOINTER_HEADER(_valtype_) |
#define | SO_MFIELD_SETVALUESPOINTER_SOURCE(_class_, _valtype_, _usertype_) |
#define | SO_MFIELD_SOURCE(_class_, _valtype_, _valref_) |
#define | SO_MFIELD_SOURCE_MALLOC(_class_, _valtype_, _valref_) |
#define | SO_MFIELD_VALUE_HEADER(_class_, _valtype_, _valref_) |
#define | SO_MFIELD_VALUE_SOURCE(_class_, _valtype_, _valref_) |
#define | SO_SFIELD_CONSTRUCTOR_HEADER(_class_) |
#define | SO_SFIELD_CONSTRUCTOR_SOURCE(_class_) |
#define | SO_SFIELD_DERIVED_HEADER(_class_, _valtype_, _valref_) |
#define | SO_SFIELD_DERIVED_SOURCE(_class_, _valtype_, _valref_) |
#define | SO_SFIELD_DERIVED_VALUE_HEADER(_class_, _valtype_, _valref_) |
#define | SO_SFIELD_HEADER(_class_, _valtype_, _valref_) |
#define | SO_SFIELD_INIT_CLASS(_class_, _parent_) |
#define | SO_SFIELD_REQUIRED_HEADER(_class_) |
#define | SO_SFIELD_REQUIRED_SOURCE(_class_) |
#define | SO_SFIELD_SOURCE(_class_, _valtype_, _valref_) |
#define | SO_SFIELD_VALUE_HEADER(_class_, _valtype_, _valref_) |
#define | SO_SFIELD_VALUE_SOURCE(_class_, _valtype_, _valref_) |
#define PRIVATE_EQUALITY_SOURCE | ( | _class_ | ) |
void \ _class_::copyFrom(const SoField & field) \ { \ this->operator=(static_cast<const _class_ &>(field)); \ } \ \ SbBool \ _class_::isSame(const SoField & field) const \ { \ if (field.getTypeId() != this->getTypeId()) return FALSE; \ return this->operator==(static_cast<const _class_ &>(field)); \ }
Definition at line 162 of file SoSubField.h.
#define PRIVATE_FIELD_INIT_CLASS | ( | _class_, | |||
_classname_, | |||||
_parent_, | |||||
_createfunc_ | ) |
do { \ /* Make sure superclass get initialized before subclass. */ \ assert(_parent_::getClassTypeId() != SoType::badType()); \ /* Make sure we only initialize once. */ \ assert(_class_::classTypeId == SoType::badType()); \ _class_::classTypeId = \ SoType::createType(_parent_::getClassTypeId(), _classname_, _createfunc_); \ cc_coin_atexit_static_internal \ ( \ _class_::atexit_cleanup \ ); \ } while (0)
Definition at line 113 of file SoSubField.h.
#define PRIVATE_MFIELD_IO_HEADER | ( | ) |
private: \ virtual SbBool read1Value(SoInput * in, int idx); \ virtual void write1Value(SoOutput * out, int idx) const
Definition at line 209 of file SoSubField.h.
#define PRIVATE_SFIELD_IO_HEADER | ( | ) |
private: \ virtual SbBool readValue(SoInput * in); \ virtual void writeValue(SoOutput * out) const
Definition at line 65 of file SoSubField.h.
#define PRIVATE_TYPEID_SOURCE | ( | _class_ | ) |
SoType _class_::getTypeId(void) const { return _class_::classTypeId; } \ SoType _class_::getClassTypeId(void) { return _class_::classTypeId; } \ void * _class_::createInstance(void) { return new _class_; } \ SoType _class_::classTypeId STATIC_SOTYPE_INIT
Definition at line 155 of file SoSubField.h.
#define SO_MFIELD_ALLOC_SOURCE | ( | _class_, | |||
_valtype_ | ) |
Definition at line 401 of file SoSubField.h.
#define SO_MFIELD_CONSTRUCTOR_SOURCE | ( | _class_ | ) |
_class_::_class_(void) \ { \ assert(_class_::classTypeId != SoType::badType()); \ this->values = NULL; \ } \ \ _class_::~_class_(void) \ { \ this->enableNotify(FALSE); /* Avoid notifying destructed containers. */ \ this->deleteAllValues(); \ }
Definition at line 279 of file SoSubField.h.
#define SO_MFIELD_DERIVED_CONSTRUCTOR_SOURCE | ( | _class_ | ) |
_class_::_class_(void) { } \ _class_::~_class_(void) { }
Definition at line 294 of file SoSubField.h.
#define SO_MFIELD_DERIVED_HEADER | ( | _class_, | |||
_valtype_, | |||||
_valref_ | ) |
SO_SFIELD_CONSTRUCTOR_HEADER(_class_); \ SO_SFIELD_REQUIRED_HEADER(_class_); \ SO_MFIELD_DERIVED_VALUE_HEADER(_class_, _valtype_, _valref_)
Definition at line 257 of file SoSubField.h.
#define SO_MFIELD_DERIVED_SOURCE | ( | _class_, | |||
_valtype_, | |||||
_valref_ | ) |
SO_MFIELD_REQUIRED_SOURCE(_class_); \ SO_MFIELD_DERIVED_CONSTRUCTOR_SOURCE(_class_)
Definition at line 483 of file SoSubField.h.
#define SO_MFIELD_DERIVED_VALUE_HEADER | ( | _class_, | |||
_valtype_, | |||||
_valref_ | ) |
PRIVATE_MFIELD_IO_HEADER(); \ public: \ _valref_ operator=(_valref_ val) { this->setValue(val); return val; }
Definition at line 243 of file SoSubField.h.
#define SO_MFIELD_HEADER | ( | _class_, | |||
_valtype_, | |||||
_valref_ | ) |
SO_SFIELD_CONSTRUCTOR_HEADER(_class_); \ SO_SFIELD_REQUIRED_HEADER(_class_); \ SO_MFIELD_VALUE_HEADER(_class_, _valtype_, _valref_)
Definition at line 250 of file SoSubField.h.
#define SO_MFIELD_INIT_CLASS | ( | _class_, | |||
_parent_ | ) | SO_SFIELD_INIT_CLASS(_class_, _parent_) |
Definition at line 274 of file SoSubField.h.
#define SO_MFIELD_MALLOC_SOURCE | ( | _class_, | |||
_valtype_ | ) |
void \ _class_::allocValues(int number) \ { \ SoMField::allocValues(number); \ }
Definition at line 459 of file SoSubField.h.
#define SO_MFIELD_REQUIRED_SOURCE | ( | _class_ | ) |
PRIVATE_TYPEID_SOURCE(_class_); \ PRIVATE_EQUALITY_SOURCE(_class_); \ const _class_ & \ _class_::operator=(const _class_ & field) \ { \ /* The allocValues() call is needed, as setValues() doesn't */ \ /* necessarily make the field's getNum() size become the same */ \ /* as the second argument (only if it expands on the old size). */ \ this->allocValues(field.getNum()); \ \ this->setValues(0, field.getNum(), field.getValues(0)); \ return *this; \ }
Definition at line 300 of file SoSubField.h.
#define SO_MFIELD_SETVALUESPOINTER_HEADER | ( | _valtype_ | ) |
void setValuesPointer(const int num, const _valtype_ * userdata); \ void setValuesPointer(const int num, _valtype_ * userdata)
Definition at line 262 of file SoSubField.h.
#define SO_MFIELD_SETVALUESPOINTER_SOURCE | ( | _class_, | |||
_valtype_, | |||||
_usertype_ | ) |
void \ _class_::setValuesPointer(const int numarg, _usertype_ * userdata) \ { \ this->makeRoom(0); \ if (numarg > 0 && userdata) { \ this->values = reinterpret_cast<_valtype_*>(userdata); /* reinterpret_cast is needed for certain special uses of this function, such as SoMFColor */ \ this->userDataIsUsed = TRUE; \ this->num = this->maxNum = numarg; \ this->valueChanged(); \ } \ } \ void \ _class_::setValuesPointer(const int numarg, const _usertype_ * userdata) \ { \ this->setValuesPointer(numarg, const_cast<_usertype_*>(userdata)); \ }
Definition at line 487 of file SoSubField.h.
#define SO_MFIELD_SOURCE | ( | _class_, | |||
_valtype_, | |||||
_valref_ | ) |
SO_MFIELD_REQUIRED_SOURCE(_class_); \ SO_MFIELD_CONSTRUCTOR_SOURCE(_class_); \ SO_MFIELD_ALLOC_SOURCE(_class_, _valtype_); \ SO_MFIELD_VALUE_SOURCE(_class_, _valtype_, _valref_)
Definition at line 476 of file SoSubField.h.
#define SO_MFIELD_SOURCE_MALLOC | ( | _class_, | |||
_valtype_, | |||||
_valref_ | ) |
SO_MFIELD_REQUIRED_SOURCE(_class_); \ SO_MFIELD_CONSTRUCTOR_SOURCE(_class_); \ SO_MFIELD_MALLOC_SOURCE(_class_, _valtype_); \ SO_MFIELD_VALUE_SOURCE(_class_, _valtype_, _valref_)
Definition at line 468 of file SoSubField.h.
#define SO_MFIELD_VALUE_HEADER | ( | _class_, | |||
_valtype_, | |||||
_valref_ | ) |
PRIVATE_MFIELD_IO_HEADER(); \ protected: \ virtual void deleteAllValues(void); \ virtual void copyValue(int to, int from); \ virtual int fieldSizeof(void) const; \ virtual void * valuesPtr(void); \ virtual void setValuesPtr(void * ptr); \ virtual void allocValues(int num); \ \ _valtype_ * values; \ public: \ _valref_ operator[](const int idx) const \ { this->evaluate(); return this->values[idx]; } \ \ const _valtype_ * getValues(const int start) const \ { this->evaluate(); return const_cast<const _valtype_ *>(this->values + start); } \ int find(_valref_ value, SbBool addifnotfound = FALSE); \ void setValues(const int start, const int num, const _valtype_ * newvals); \ void set1Value(const int idx, _valref_ value); \ void setValue(_valref_ value); \ _valref_ operator=(_valref_ val) { this->setValue(val); return val; } \ SbBool operator==(const _class_ & field) const; \ SbBool operator!=(const _class_ & field) const { return !operator==(field); } \ _valtype_ * startEditing(void) { this->evaluate(); return this->values; } \ void finishEditing(void) { this->valueChanged(); }
Definition at line 216 of file SoSubField.h.
#define SO_MFIELD_VALUE_SOURCE | ( | _class_, | |||
_valtype_, | |||||
_valref_ | ) |
Definition at line 317 of file SoSubField.h.
#define SO_SFIELD_CONSTRUCTOR_HEADER | ( | _class_ | ) |
public: \ _class_(void); \ virtual ~_class_()
Definition at line 45 of file SoSubField.h.
#define SO_SFIELD_CONSTRUCTOR_SOURCE | ( | _class_ | ) |
_class_::_class_(void) { assert(_class_::classTypeId != SoType::badType()); } \
_class_::~_class_() { }
Definition at line 135 of file SoSubField.h.
#define SO_SFIELD_DERIVED_HEADER | ( | _class_, | |||
_valtype_, | |||||
_valref_ | ) |
SO_SFIELD_CONSTRUCTOR_HEADER(_class_); \ SO_SFIELD_REQUIRED_HEADER(_class_); \ SO_SFIELD_DERIVED_VALUE_HEADER(_class_, _valtype_, _valref_)
Definition at line 100 of file SoSubField.h.
#define SO_SFIELD_DERIVED_SOURCE | ( | _class_, | |||
_valtype_, | |||||
_valref_ | ) |
SO_SFIELD_CONSTRUCTOR_SOURCE(_class_); \ SO_SFIELD_REQUIRED_SOURCE(_class_)
Definition at line 198 of file SoSubField.h.
#define SO_SFIELD_DERIVED_VALUE_HEADER | ( | _class_, | |||
_valtype_, | |||||
_valref_ | ) |
PRIVATE_SFIELD_IO_HEADER(); \ public: \ _valref_ operator=(_valref_ newvalue) { this->setValue(newvalue); return this->value; }
Definition at line 87 of file SoSubField.h.
#define SO_SFIELD_HEADER | ( | _class_, | |||
_valtype_, | |||||
_valref_ | ) |
SO_SFIELD_CONSTRUCTOR_HEADER(_class_); \ SO_SFIELD_REQUIRED_HEADER(_class_); \ SO_SFIELD_VALUE_HEADER(_class_, _valtype_, _valref_)
Definition at line 94 of file SoSubField.h.
#define SO_SFIELD_INIT_CLASS | ( | _class_, | |||
_parent_ | ) |
do { \ const char * classname = SO__QUOTE(_class_); \ PRIVATE_FIELD_INIT_CLASS(_class_, classname, _parent_, &_class_::createInstance); \ } while (0)
Definition at line 129 of file SoSubField.h.
Referenced by MeshGui::SoSFMeshPointArray::initClass(), MeshGui::SoSFMeshObject::initClass(), and MeshGui::SoSFMeshFacetArray::initClass().
#define SO_SFIELD_REQUIRED_HEADER | ( | _class_ | ) |
private: \ static SoType classTypeId; \ static void atexit_cleanup(void) { SoType::removeType(_class_::classTypeId.getName()); _class_::classTypeId STATIC_SOTYPE_INIT; } \ public: \ static void * createInstance(void); \ static SoType getClassTypeId(void); \ virtual SoType getTypeId(void) const; \ \ virtual void copyFrom(const SoField & field); \ const _class_ & operator=(const _class_ & field); \ virtual SbBool isSame(const SoField & field) const
Definition at line 51 of file SoSubField.h.
#define SO_SFIELD_REQUIRED_SOURCE | ( | _class_ | ) |
PRIVATE_TYPEID_SOURCE(_class_); \ PRIVATE_EQUALITY_SOURCE(_class_); \ \ const _class_ & \ _class_::operator=(const _class_ & field) \ { \ this->setValue(field.getValue()); \ return *this; \ }
Definition at line 178 of file SoSubField.h.
#define SO_SFIELD_SOURCE | ( | _class_, | |||
_valtype_, | |||||
_valref_ | ) |
SO_SFIELD_CONSTRUCTOR_SOURCE(_class_); \ SO_SFIELD_VALUE_SOURCE(_class_, _valtype_, _valref_); \ SO_SFIELD_REQUIRED_SOURCE(_class_)
Definition at line 191 of file SoSubField.h.
#define SO_SFIELD_VALUE_HEADER | ( | _class_, | |||
_valtype_, | |||||
_valref_ | ) |
PRIVATE_SFIELD_IO_HEADER(); \ protected: \ _valtype_ value; \ \ public: \ _valref_ getValue(void) const { this->evaluate(); return this->value; } \ void setValue(_valref_ newvalue); \ _valref_ operator=(_valref_ newvalue) { this->setValue(newvalue); return this->value; } \ \ int operator==(const _class_ & field) const; \ int operator!=(const _class_ & field) const { return ! operator==(field); }
Definition at line 71 of file SoSubField.h.
#define SO_SFIELD_VALUE_SOURCE | ( | _class_, | |||
_valtype_, | |||||
_valref_ | ) |
void \ _class_::setValue(_valref_ valuearg) { \ this->value = valuearg; \ this->valueChanged(); \ } \ \ SbBool \ _class_::operator==(const _class_ & field) const \ { \ return (this->getValue() == field.getValue()); \ }
Definition at line 141 of file SoSubField.h.