95 void setValue(
bool boolValue) { setBoolValue(boolValue); }
98 void updateValue(
bool boolValue) { updateBoolValue(boolValue); }
117 void _initialize(
const std::string& name=
"",
bool* valuePtr=
nullptr);
177 MLint _internalValue;
180 void _initialize(
const std::string& name=
"",
MLintPtr valuePtr=
nullptr);
207 EnumField(
const std::string& name,
const std::string enumerationItemNames[],
size_t numEnumerationItems);
216 EnumField(
const std::string& name,
const char*
const* enumerationItemNames,
size_t numEnumerationItems);
225 EnumField(
const std::string& name,
const std::vector<std::string> &enumerationItemNames);
257 EnumEntry(
const std::string& sv,
int v) : stringValue(sv), value(v) { }
275 void setValue(
int enumValue) { setEnumValue(enumValue); }
286 void _initialize(
const std::string& name=
"",
size_t numEnums=0,
int* valuePtr=
nullptr);
317template <
typename EnumType>
323 Entry():stringValue(nullptr), value(-1) {}
324 Entry(
const char* sv, EnumType v) : stringValue(sv), value(v) { }
334 void add(
const char* stringValue, EnumType value) {
339 void add(
const std::string& stringValue, EnumType value) {
355 const std::vector<EnumField::EnumEntry>&
getEntries()
const {
return _entries; }
364#define ML_ENUM_VALUE(enumValue) internal::createEnumEntry(#enumValue, enumValue)
368#define ML_EXTERNAL_ENUM_VALUE(enumClass, enumValue) internal::createEnumEntry(#enumValue, enumClass::enumValue)
372 template <
typename EnumType>
382template <
typename EnumType>
386 static_assert(
sizeof(std::underlying_type<EnumType>) <=
sizeof(
int),
"The underlying type cannot be bigger than int!");
391 const std::vector<EnumField::EnumEntry>& entries = enumValues.
getEntries();
392 _initialize(name, entries.size());
393 _setEnumerationNames(entries,
static_cast<int>(initialValue));
397 EnumType
getEnumValue()
const {
return static_cast<EnumType
>(EnumField::getEnumValue()); }
399 void setEnumValue(EnumType enumValue) { EnumField::setEnumValue(
static_cast<int>(enumValue)); }
401 void updateEnumValue(EnumType enumValue) { EnumField::updateEnumValue(
static_cast<int>(enumValue)); }
403 EnumType
getValue()
const {
return getEnumValue(); }
405 void setValue(EnumType enumValue) { setEnumValue(enumValue); }
407 void updateValue(EnumType enumValue) { updateEnumValue(enumValue); }
449 void setValue(
float floatValue) { setFloatValue(floatValue); }
452 void updateValue(
float floatValue) { updateFloatValue(floatValue); }
465 void _initialize(
const std::string& name=
"",
float* valuePtr=
nullptr);
521 void setValue(
float floatValue) { setFloatValue(floatValue); }
572 void setValue(
double doubleValue) { setDoubleValue(doubleValue); }
575 void updateValue(
double doubleValue) { updateDoubleValue(doubleValue); }
578 double getValue()
const {
return getDoubleValue(); }
592 double _internalValue;
595 void _initialize(
const std::string& name=
"",
double* valuePtr=
nullptr);
639 void updateValue(
const std::string& stringValue) { updateStringValue(stringValue); }
650 void _initialize(
const std::string& name=
"");
841 template <
typename T>
847 template <
typename T>
852 template <
typename T>
863 void setValue(
Base* basePointerValue) { setBaseValue(basePointerValue); }
866 void setValue(
const RefCountedBasePtr& value) { setBaseValue(value); }
872 template <
class Type>
876 template <
class Type>
888 std::vector<const RuntimeType*> _allowedTypes;
893 bool _isRefCountedBase;
896 void _initialize(
const std::string& name=
"");
913 void setValue(T* basePointerValue) { setBaseValue(basePointerValue); }
919 T*
getValue()
const {
return getTypedValue<T*>(); }
923 void addAllowedType() {}
925 void setBaseValueAndAddAllowedType() {}
965 void setValue(SoNode* soNodeValue) { setSoNodeValue(soNodeValue); }
968 SoNode*
getValue()
const {
return getSoNodeValue(); }
976 SoNode* _internalValue;
979 void _initialize(
const std::string& name=
"");
1020 void setValue(
void* voidPointerValue) { setPointerValue(voidPointerValue); }
1030 void _initialize(
const std::string& name=
"");
1095 void _initialize(
const std::string& name=
"",
Vector2* valuePtr=
nullptr);
1163 void _initialize(
const std::string& name=
"",
Vector3* valuePtr=
nullptr);
1231 void _initialize(
const std::string& name=
"",
Vector4* valuePtr=
nullptr);
1296 void _initialize(
const std::string& name=
"");
1365 void _initialize(
const std::string& name=
"",
Vector6* valuePtr=
nullptr);
1431 void _initialize(
const std::string& name=
"");
1673 void _initialize(
const std::string& name=
"",
Matrix4* valuePtr=
nullptr);
1862 void _initialize(
const std::string& name=
"",
MLDataType* valuePtr=
nullptr);
1922 void _initialize(
const std::string& name=
"",
ImageVector* valuePtr=
nullptr);
1983 void _initialize(
const std::string& name=
"",
SubImageBox* valuePtr=
nullptr);
2044 void _initialize(
const std::string& name=
"",
SubImageBoxd* valuePtr=
nullptr);
2122 std::string _origString;
2126 std::string _strValue;
Field to encapsulate a pointer to an ML base object.
Base * getValue() const
Same as getBaseValue().
void setBaseValue(const RefCountedBasePtr &value)
Sets the value from intrusive pointer.
void setValue(Base *basePointerValue)
Same as setBaseValue(Base*).
BaseField(const std::string &name)
Constructor, creates a field with a name to manage a base pointer.
void setValue(const RefCountedBasePtr &value)
Same as setBaseValue(const RefCountedBasePtr&).
std::string getStringValue() const override
Returns the value of the field as a string value.
void setBaseValue(Base *basePointerValue)
Sets the value of the field to basePointerValue.
Base * getBaseValue() const
Returns current field value.
BaseField()
Implements the runtime type system interface for this class.
void setStringValue(const std::string &stringValue) override
Sets pointer value from string stringValue. If string cannot be parsed successfully,...
std::vector< const RuntimeType * > getAllowedTypes() const
Get list of allowed Base types for this field.
void setBaseValueAndAddAllowedType(const ::boost::intrusive_ptr< T > &value)
convenience routine for setting the base value and its type at the same time using an intrusive point...
bool hasUnallowedType() const
return true if the last call of setBaseValue had an unallowed type as argument, getBaseValue will ret...
void addAllowedType(const RuntimeType *allowedType)
Add type to list of allowed types.
void addAllowedType()
Same as above, with template parameter where the Base type can be specified directly.
~BaseField() override
Destructor.
virtual void touchSourceFields(void)
Touches the source fields.
Type getTypedBaseValue() const
Get typed value if the contained base object is derived from the given Type.
Type getTypedValue() const
Get typed value if the contained base object is derived from the given Type.
void setValueFromField(const Field &field) override
Reimplementation from Field which copies the field value more efficiently.
void setBaseValueAndAddAllowedType(T *value)
convenience routine for setting the base value and its type at the same time.
Class representing general ML objects that support import/export via strings (setPersistentState() an...
Field to encapsulate a boolean value.
BoolField()
Implements the runtime type system interface for this class.
void setBoolValue(bool boolValue)
Sets the field value to boolValue.
std::string getStringValue() const override
Returns the value of the field as string value.
bool getValue() const
Same as getBoolValue().
bool isOn() const
Returns the value of the field as Boolean.
void setValueFromField(const Field &field) override
Reimplementation from Field which copies the field value more efficiently.
void toggleValue()
Toggles the Boolean field value.
void setStringValue(const std::string &value) override
Sets the value of the field to value.
BoolField(const std::string &name)
Constructor, creates a field with a name to manage a Boolean value.
bool getBoolValue() const
Returns the value of the field as a Boolean.
void setValue(bool boolValue)
Same as setBoolValue().
void updateValue(bool boolValue)
Same as updateBoolValue().
void updateBoolValue(bool boolValue)
Sets the field value to boolValue, but only touch field if the new value is different from the old va...
Field to encapsulate a vector of 3 float values representing an (rgb) color with all properties of Ve...
void setColorValue(float r, float g, float b)
Sets the field value to r, g and b.
ColorField()
Implements the runtime type system interface for this class.
void setPackedColorValue(MLuint32 rgba)
Sets the packed uint32 color value to rgba.
ColorField(const std::string &name)
Constructor, create a field with a name to manage a vector of 3 float values interpreted as rgb-color...
const Vector3 & getColorValue() const
Returns the value of the field as a Vector3.
void updateColorValue(float r, float g, float b)
Sets the field value to r, g and b, but only touch field if the new value is different from the old v...
MLuint32 getPackedColorValue() const
Returns the packed uint32 color value.
void getColorValue(float &r, float &g, float &b) const
Returns the value of the field into the floats r, g, and b.
Field to encapsulate a double value.
void setValueFromField(const Field &field) override
Reimplementation from Field which copies the field value more efficiently.
void updateDoubleValue(double doubleValue)
Set field value to doubleValue, but only touch field if the new value is different from the old value...
double getDoubleValue() const
Returns current field value.
DoubleField()
Implements the runtime type system interface for this class.
DoubleField(const std::string &name)
Constructor, creates a field with a name to manage a double value.
std::string getStringValue() const override
Returns the value of the field as a string value setStringValue must be able to reinterpret this retu...
void setDoubleValue(double doubleValue)
Set field value to doubleValue. By default the entire double type range can be set.
void setValue(double doubleValue)
Same as setDoubleValue().
void setStringValue(const std::string &stringValue) override
Sets value of the field to stringValue.
void updateValue(double doubleValue)
Same as updateDoubleValue().
static void setValueCallback(void *field, double value)
Callback method that can be used as a MLRequestProgressCB to set the progress to the field.
double getValue() const
Same as getDoubleValue().
Field to encapsulate an enumerated value.
void setEnumValue(int enumValue)
Sets field value to enumValue.
void _setEnumerationNames(const std::vector< EnumField::EnumEntry > &enumValues, int initialValue)
Sets the enumeration item names.
int _internalValue
Stores the int value (if no external deprecated reference was given).
void setStringValue(const std::string &value) override
Sets value of the field to the enum item with given name value.
std::vector< EnumEntry > _entries
Stores the possible enum values and names.
void _setEnumerationNames(const std::vector< std::string > &enumNames)
Sets the enumeration item names.
std::string getStringValue() const override
Returns the value of the field as string value.
void updateEnumValue(int enumValue)
Sets field value to enumValue, but only touch field if the new value is different from the old value.
EnumField(const std::string &name, const char *const *enumerationItemNames, size_t numEnumerationItems)
Constructor, creates a field with a name to manage an enum value.
EnumField(const std::string &name, const std::string enumerationItemNames[], size_t numEnumerationItems)
Implements the runtime type system interface for this class.
EnumField()
Protected constructor to allow derived classes.
bool _linearEntries
Stores if enum entry values start at 0 and increase by 1.
const EnumEntry & getEnumEntryAtIndex(size_t index) const
Returns the enum entry at given index, which allows to enumerate all existing enum entries.
size_t getNumEnumerationItems() const
Returns the number of registered enum values defined in constructor.
~EnumField() override
Destroys this field and releases internally allocated memory.
void setStringValueDefaulted(const std::string &value)
If value equals one of the enum item names, set the field to this item, otherwise set it to the first...
void setValue(int enumValue)
Same as setEnumValue().
int getEnumValue() const
Returns the current enum value as integer.
int * _valuePtr
Points to the variable containing the field value; we use an integer to be compatible to normal enum ...
void _setEnumerationNames(const std::string enumNames[])
Sets the enumeration item names.
void _initialize(const std::string &name="", size_t numEnums=0, int *valuePtr=nullptr)
Initializes this field.
void updateValue(int enumValue)
Same as updateEnumValue().
void _setEnumerationNames(const char *const *enumNames)
Sets the enumeration item names.
EnumField(const std::string &name, const std::vector< std::string > &enumerationItemNames)
Constructor, creates a field with a name to manage an enum value.
int getValue() const
Same as getEnumValue().
Helper class that stores a list of typed enum values and their string names.
const std::vector< EnumField::EnumEntry > & getEntries() const
Get access to the collected list of enum entries.
void add(const Entry &value)
Add an enum value via the given entry, which is typically created with the ML_ENUM_VALUE() macro.
void add(const std::string &stringValue, EnumType value)
Add an enum value, manually passing in the name and value.
std::vector< EnumField::EnumEntry > _entries
EnumValues & operator<<(const Entry &value)
Add an enum value via the given entry, which is typically created with the ML_ENUM_VALUE() macro.
void add(const char *stringValue, EnumType value)
Add an enum value, manually passing in the name and value.
Strength
Enumeration type describing the strength of notifications.
Base class for all fields used in the ML.
virtual std::string getStringValue() const =0
Returns the value of the field as string value.
virtual void setStringValue(const std::string &value)=0
Set field value as string value.
Field to encapsulate a float value.
float _internalValue
Stores the float value (if no external deprecated reference was given).
std::string getStringValue() const override
Returns the value of the field as a string value.
void setStringValue(const std::string &stringValue) override
Sets the value of the field to stringValue.
float getFloatValue() const
Returns the value of the field.
void setFloatValue(float floatValue)
Sets the field value to floatValue.
FloatField(const std::string &name)
Constructor, create a field with a name to manage a float value, with 0 as a default value.
float getValue() const
Same as getFloatValue().
float _maxValue
Maximum float value which can be set.
float * _valuePtr
Points to the variable containing the field value.
FloatField()
Implements the runtime type system interface for this class.
void updateValue(float floatValue)
Same as updateFloatValue().
void updateFloatValue(float floatValue)
Sets the field value to floatValue, but only touch field if the new value is different from the old v...
void setValue(float floatValue)
Same as setFloatValue().
void setValueFromField(const Field &field) override
Reimplementation from Field which copies the field value more efficiently..
void _initialize(const std::string &name="", float *valuePtr=nullptr)
Initializes this field.
float _minValue
Minimum float value which can be set.
static void setValueCallback(void *field, double value)
Callback method that can be used as a MLRequestProgressCB to set the progress to the field.
Field to encapsulate an ML vector ImageVector with 6 integer components.
void setStringValue(const std::string &stringValue) override
Sets the value of the field to stringValue.
void updateImageVectorValue(const ImageVector &imageVectorValue)
Sets the value of the field to imageVectorValue, but only touch field if the new value is different f...
ImageVectorField()
Implements the runtime type system interface for this class.
void setValueFromField(const Field &field) override
Reimplementation from Field which copies the field value more efficiently.
void setImageVectorValue(const ImageVector &imageVectorValue)
Sets the value of the field to imageVectorValue.
ImageVectorField(const std::string &name)
Constructor, creates a field with a name to manage a vector of 6 integer values.
void setValue(const ImageVector &imageVectorValue)
Same as setImageVectorValue().
std::string getStringValue() const override
Returns the value of the field as a string value.
const ImageVector & getImageVectorValue() const
Returns the value of the field.
const ImageVector & getValue() const
Same as getImageVectorValue().
void updateValue(const ImageVector &imageVectorValue)
Same as updateImageVectorValue().
Field to encapsulate an integer value.
void setIntValue(MLint intValue)
Sets field value to intValue.
IntField(const std::string &name)
Constructor, creates a field with a name to manage an integer value.
MLint getValue() const
Same as getIntValue().
void updateValue(MLint intValue)
Same as updateIntValue().
void setStringValue(const std::string &value) override
Sets value of the field to value.
MLint getIntValue() const
Returns the value of the field as an MLint.
std::string getStringValue() const override
Returns the value of the field as a string value.
void setValue(MLint intValue)
Same as setIntValue().
void updateIntValue(MLint intValue)
Sets field value to intValue, but only touch field if the new value is different from the old value.
void setValueFromField(const Field &field) override
Reimplementation from Field which copies the field value more efficiently.
IntField()
Implements the runtime type system interface for this class.
Field to encapsulate an MLDataType value.
MLDataType getMLDataTypeValue() const
Returns the value of the field.
MLDataTypeField(const std::string &name)
Constructor, creates a field with a name to manage an MLDataType value.
MLDataType getValue() const
Same as getMLDataTypeValue().
std::string getStringValue() const override
Returns the value of the field as a string value.
MLDataTypeField()
Implements the runtime type system interface for this class.
void setMLDataTypeValue(MLDataType dataType)
Sets the field value to data type dataType.
void setValue(MLDataType dataType)
Same as setMLDataTypeValue().
void setStringValue(const std::string &stringValue) override
Sets the value of the field to stringValue. Invalid types set the type to MLint8Type.
Field encapsulating a 2x2 matrix.
void updateMatrix2Value(const Matrix2 &matrixValue)
Sets the value of the field to matrixValue, but only touch field if the new value is different from t...
void setMatrixValue(const Matrix2 &matrixValue)
Sets the value of the field to matrixValue.
const Matrix2 & getValue() const
Same as getMatrix2Value().
void setValueFromField(const Field &field) override
Reimplementation from Field which copies the field value more efficiently.
void setStringValue(const std::string &stringValue) override
Sets the field value to stringValue="a11 a12 a21 a22".
const Matrix2 & getMatrix2Value() const
Returns the value of the field; same as getMatrixValue for symmetry to other fields.
Matrix2Field(const std::string &name="")
Implements the runtime type system interface for this class.
void setValue(const Matrix2 &matrixValue)
Same as setMatrix2Value().
const Matrix2 & getMatrixValue() const
Returns the value of the field.
void updateValue(const Matrix2 &matrixValue)
Same as updateMatrix2Value().
std::string getStringValue() const override
Returns the value of the field as a string value.
void setMatrix2Value(const Matrix2 &matrixValue)
Sets the value of the field to matrixValue; same as setMatrixValue for symmetry to other fields.
Field encapsulating a 3x3 matrix.
const Matrix3 & getMatrix3Value() const
Returns the value of the field; same as getMatrixValue for symmetry to other fields.
void setStringValue(const std::string &stringValue) override
Sets the field value to stringValue="a11 a12 ... a33".
void setValueFromField(const Field &field) override
Reimplementation from Field which copies the field value more efficiently.
const Matrix3 & getValue() const
Same as getMatrix3Value().
void setValue(const Matrix3 &matrixValue)
Same as setMatrix3Value().
void setMatrixValue(const Matrix3 &matrixValue)
Sets the value of the field to matrixValue.
void updateValue(const Matrix3 &matrixValue)
Same as updateMatrix3Value().
Matrix3Field(const std::string &name="")
Implements the runtime type system interface for this class.
void setMatrix3Value(const Matrix3 &matrixValue)
Sets the value of the field to matrixValue; same as setMatrixValue for symmetry to other fields.
void updateMatrix3Value(const Matrix3 &matrixValue)
Sets the value of the field to matrixValue, but only touch field if the new value is different from t...
std::string getStringValue() const override
Returns the value of the field as a string value.
const Matrix3 & getMatrixValue() const
Returns the value of the field.
Field to encapsulate a 4x4 matrix.
Matrix4Field(const std::string &name="")
Implements the runtime type system interface for this class.
Field encapsulating a 5x5 matrix.
void setMatrix5Value(const Matrix5 &matrixValue)
Sets the value of the field to matrixValue; same as setMatrixValue for symmetry to other fields.
void setMatrixValue(const Matrix5 &matrixValue)
Sets the value of the field to matrixValue.
void setValueFromField(const Field &field) override
Reimplementation from Field which copies the field value more efficiently.
Matrix5Field(const std::string &name="")
Implements the runtime type system interface for this class.
void setValue(const Matrix5 &matrixValue)
Same as setMatrix5Value().
const Matrix5 & getMatrix5Value() const
Returns the value of the field; same as getMatrixValue for symmetry to other fields.
std::string getStringValue() const override
Returns the value of the field as a string value.
void updateValue(const Matrix5 &matrixValue)
Same as updateMatrix5Value().
const Matrix5 & getMatrixValue() const
Returns the value of the field.
void setStringValue(const std::string &stringValue) override
Sets the field value to stringValue="a11 a12 ... a55".
const Matrix5 & getValue() const
Same as getMatrix4Value().
void updateMatrix5Value(const Matrix5 &matrixValue)
Sets the value of the field to matrixValue, but only touch field if the new value is different from t...
Field encapsulating a 6x6 matrix.
void updateValue(const Matrix6 &matrixValue)
Same as updateMatrix6Value().
std::string getStringValue() const override
Returns the value of the field as a string value.
const Matrix6 & getValue() const
Same as getMatrix6Value().
Matrix6Field(const std::string &name="")
Implements the runtime type system interface for this class.
void setValue(const Matrix6 &matrixValue)
Same as setMatrix6Value().
void setValueFromField(const Field &field) override
Reimplementation from Field which copies the field value more efficiently.
void setMatrixValue(const Matrix6 &matrixValue)
Sets the value of the field to matrixValue.
const Matrix6 & getMatrix6Value() const
Returns the value of the field; same as getMatrixValue for symmetry to other fields.
const Matrix6 & getMatrixValue() const
Returns the value of the field.
void updateMatrix6Value(const Matrix6 &matrixValue)
Sets the value of the field to matrixValue, but only touch field if the new value is different from t...
void setStringValue(const std::string &stringValue) override
Sets the field value to stringValue="a11 a12 ... a66".
void setMatrix6Value(const Matrix6 &matrixValue)
Sets the value of the field to matrixValue; same as setMatrixValue for symmetry to other fields.
Field to encapsulate a 4x4 matrix, same as Matrix4Field for backward compatibility.
void setStringValue(const std::string &stringValue) override
Sets the field value to stringValue="a11 a12 ... a44".
const Matrix4 & getMatrixValue() const
Returns the value of the field.
MatrixField()
Implements the runtime type system interface for this class.
void setValue(const Matrix4 &matrixValue)
Same as setMatrix4Value().
void setValueFromField(const Field &field) override
Reimplementation from Field which copies the field value more efficiently.
void setMatrix4Value(const Matrix4 &matrixValue)
Sets the value of the field to matrixValue; same as setMatrixValue for symmetry to other fields.
MatrixField(const std::string &name)
Constructor, creates a field with a name to manage a 4x4 matrix.
void updateMatrix4Value(const Matrix4 &matrixValue)
Sets the value of the field to matrixValue, but only touch field if the new value is different from t...
const Matrix4 & getMatrix4Value() const
Returns the value of the field; same as getMatrixValue for symmetry to other fields.
std::string getStringValue() const override
Returns the value of the field as a string value.
void setMatrixValue(const Matrix4 &matrixValue)
Sets the value of the field to matrixValue.
const Matrix4 & getValue() const
Same as getMatrix4Value().
void updateValue(const Matrix4 &matrixValue)
Same as updateMatrix4Value().
Base class for an image processing module of the ML.
Field without value for notifications.
std::string getStringValue() const override
Returns an empty string, because the field has no value.
void setStringValue(const std::string &) override
Only calls notifyAttachments() to notify attached fields or sensors.
void notify()
Calls touch() to notify connected sensors or fields.
NotifyField()
Implements the runtime type system interface for this class.
NotifyField(const std::string &name)
Constructor, creates a notification field with a name.
Field to encapsulate a pointer to an output connector which represents a module output.
std::string getStringValue() const override
Reference to OutputConnector as C-string to return (OutputConnector do not have a value,...
MLint isValidValue() override
Returns 1 if connector field contains a valid connector pointer.
OutputConnectorField()
Implements the runtime type system interface for this class.
OutputConnectorField(const std::string &name, Module *module, MLint outputImageIndex)
Constructor, creates a field with a name to manage an OutputConnector on the Module module at index o...
void setStringValue(const std::string &) override
Only calls touch() to propagate notifications.
void touch(FieldSensor::Strength strength=FieldSensor::CHANGED) override
A notified output image must also clear its PagedImage if it is considered as changed.
OutputConnector & getOutputConnectorValue() const
Returns a reference to the OutputConnector.
~OutputConnectorField() override
Destroys the field.
Class to manage an output connection for a Module module.
Field to encapsulate a vector of 4 double values representing a plane with all properties of Vector4F...
void setPlaneValue(double f0, double f1, double f2, double f3)
Set field value to (f0, f1, f2, f3).
void getPlaneValue(double &f0, double &f1, double &f2, double &f3) const
Returns the value of the field.
void setPlaneValue(const Plane &p)
Set field value to p.
PlaneField(const std::string &name="")
Implements the runtime type system interface for this class.
Plane getPlaneValue() const
Returns the value of the field.
void getPlaneValue(Plane &plane) const
Returns the value of the field.
Class defining a plane in 3D.
Field to encapsulate a void pointer to arbitrary data.
void setStringValue(const std::string &stringValue) override
Sets field value from string to stringValue.
void * getPointerValue() const
Returns the value of the field.
std::string getStringValue() const override
Returns the value of the field as string value.
void setValue(void *voidPointerValue)
Same as setPointerValue().
PointerField()
Implements the runtime type system interface for this class.
void * getValue() const
Same as getPointerValue().
void setPointerValue(void *voidPointerValue)
Sets value of the field to voidPointerValue.
PointerField(const std::string &name)
Constructor, creates a field with a name to manage a void pointer.
Field to encapsulate an increasing float value from range [0,1].
void setProgressValue(float floatValue)
Same as setFloatValue().
void setValue(float floatValue)
Same as setFloatValue().
ProgressField(const std::string &name)
Constructor, creates a field with a name to manage a progressive float value.
ProgressField()
Implements the runtime type system interface for this class.
void setFloatValue(float floatValue)
Sets field value to floatValue if floatValue==0, floatValue==1 or floatValue > previous floatValue + ...
void setUpdateDifference(float epsilonValue)
Sets an epsilon value which a new value must have more than the previous value to be accepted as new ...
float getProgressValue()
Same as getFloatValue().
Field to encapsulate a vector of 4 double values representing a rotation with all properties of Vecto...
RotationField(const std::string &name="")
Implements the runtime type system interface for this class.
Rotation getRotationValue() const
Returns rotation value as a rotation class instance.
void setRotationValue(const Rotation &rot)
Sets rotation value by a rotation instance.
void setRotationValue(const Vector3 &vec, double angle)
Set rotation as rotation axes and angle how much to rotate.
void getRotationValue(Vector3 &vec, double &angle) const
Returns rotation as vector and rotation angle.
Class to handle Rotations (internally the rotation is stored as a unit quaternion)
RuntimeType contains type and inheritance information of a class and a static dictionary with informa...
Field to encapsulate a pointer to an SoNode instance of OpenInventor.
SoNodeField()
Implements the runtime type system interface for this class.
SoNode * getSoNodeValue() const
Returns the value of the field.
SoNodeField(const std::string &name)
Constructor, creates a field with a name to manage a SoNode pointer.
void setSoNodeValue(SoNode *soNodeValue)
Sets value of the field to soNodeValue.
void setValue(SoNode *soNodeValue)
Same as setSoNodeValue().
std::string getStringValue() const override
Returns the value of the field as string value.
void setValueFromField(const Field &field) override
Reimplementation from Field which copies the field value more efficiently.
SoNode * getValue() const
Same as getSoNodeValue().
void setStringValue(const std::string &stringValue) override
Sets field value from string to stringValue. On non-successful string parsing, a NULL pointer is set.
Field to encapsulate a string value.
std::string getStringValue() const override
Returns the value of the field as a string value setStringValue must be able to reinterpret this retu...
StringField()
Implements the runtime type system interface for this class.
std::string getValue() const
Same as getStringValue().
void updateStringValue(const std::string &stringValue)
Sets value of the field to stringValue, but only touch field if the new value is different from the o...
StringField(const std::string &name)
Constructor, creates a field with a name to manage a string value.
void setStringValue(const std::string &stringValue) override
Sets value of the field to stringValue.
void updateValue(const std::string &stringValue)
Same as updateStringValue().
void setValue(const std::string &stringValue)
Same as setStringValue().
Field to encapsulate an ML integer SubimgBox.
void setValue(const SubImageBox &subImageBoxValue)
Same as setSubImageBoxValue().
SubImageBoxField(const std::string &name)
Constructor, creates a field with a name to manage an integer box.
void setValueFromField(const Field &field) override
Reimplementation from Field which copies the field value more efficiently.
std::string getStringValue() const override
Returns the value of the field as a string value.
SubImageBoxField()
Implements the runtime type system interface for this class.
void updateSubImageBoxValue(const SubImageBox &subImageBoxValue)
Sets the value of the field to subImageBoxValue, but only touch field if the new value is different f...
const SubImageBox & getSubImageBoxValue() const
Returns the value of the field.
const SubImageBox & getValue() const
Same as getSubImageBoxValue().
void setSubImageBoxValue(const SubImageBox &subImageBoxValue)
Sets the value of the field to subImageBoxValue.
void updateValue(const SubImageBox &subImageBoxValue)
Same as updateSubImageBoxValue().
void setStringValue(const std::string &stringValue) override
Sets the value of the field to stringValue.
Field to encapsulate an ML double SubimgBox.
const SubImageBoxd & getSubImageBoxdValue() const
Returns the value of the field.
void updateSubImageBoxdValue(const SubImageBoxd &subImageBoxfValue)
Sets the value of the field to subImageBoxfValue, but only touch field if the new value is different ...
void setValueFromField(const Field &field) override
Reimplementation from Field which copies the field value more efficiently.
const SubImageBoxd & getValue() const
Same as getSubImageBoxdValue().
void setValue(const SubImageBoxd &subImageBoxValue)
Same as setSubImageBoxdValue().
void setStringValue(const std::string &stringValue) override
Sets the value of the field to stringValue.
std::string getStringValue() const override
Returns the value of the field as a string value.
SubImageBoxdField()
Implements the runtime type system interface for this class.
SubImageBoxdField(const std::string &name)
Constructor, creates a field with a name to manage a float box.
void updateValue(const SubImageBoxd &subImageBoxValue)
Same as updateSubImageBoxdValue().
void setSubImageBoxdValue(const SubImageBoxd &subImageBoxfValue)
Sets the value of the field to subImageBoxfValue.
SubImageBoxd - SubImageBox with coordinates of float data type.
Templated version of BaseField which only stores the template type as pointer.
void setValue(T *basePointerValue)
Sets the value of the field to basePointerValue.
void setValue(const ::boost::intrusive_ptr< T > &value)
Sets the value from intrusive pointer.
T * getValue() const
Returns current field value.
TypedBaseField(const std::string &name)
Constructor, creates a field with a name to manage a typed Base pointer. Default value is NULL.
TypedEnumField is used to encapsulate a C++ enum value and work with a real enum value instead of int...
TypedEnumField(const std::string &name, const EnumValues< EnumType > &enumValues, EnumType initialValue)
Create the TypedEnumField with given name, enumValues and initialValue.
EnumType getEnumValue() const
Gets the current enum value.
void setEnumValue(EnumType enumValue)
Sets the current enum value and touches the field.
EnumType getValue() const
Same as getEnumValue().
void updateValue(EnumType enumValue)
Same as updateEnumValue().
void updateEnumValue(EnumType enumValue)
Sets the current enum value and only touches the field if the value has changed.
void setValue(EnumType enumValue)
Same as setEnumValue().
Field to encapsulate any of the registered ML types.
virtual void _updateIsValidAndTypeDataFromOrigString()
Parse _origString dependent on the current data type and update _isValid and _typeData.
void setStringValue(const std::string &stringValue) override
Sets the value of the field to stringValue.
virtual void _updateIsValidAndStrValueFromTypeData()
Parse _typeData dependent on the current data type and update _isValid and _strValue.
virtual void setDataType(MLDataType dataType)
Sets the data type to dataType.
void setValue(const MLTypeData *typeData)
Same as setUniversalTypeValue().
void _updateFieldFromOrigString()
Combine the above methods, return _origString on invalid data type, and touch the field.
MLint isValidValue() override
Returns true (=1) if field value is valid, otherwise false (=0).
MLTypeData * getValue() const
Same as getUniversalTypeValue().
virtual void setUniversalTypeValue(const MLTypeData *dataType)
Sets the value of the field to dataType. The passed data is copied.
virtual MLDataType getDataType() const
Returns the current data type of this field. Default is invalid, i.e., -1.
UniversalTypeField(const std::string &name="", MLDataType dt=-1)
Implements the runtime type system interface for this class.
std::string getStringValue() const override
Returns the value of the field as a string value.
~UniversalTypeField() override
Destructor, frees buffer for type data.
virtual MLldouble getValueCastToLDouble() const
Returns the current value of the field cast to MLldouble.
virtual const MLTypeData * getShortLivedUniversalTypeValue() const
Returns the temporary internal buffer value of the field which is short-lived and which must NOT be m...
virtual MLTypeData * getUniversalTypeValue() const
Returns the current value of the field as a memory copy which can be changed by the caller.
Field to encapsulate a vector of 10 double values.
Vector10Field()
Implements the runtime type system interface for this class.
void setStringValue(const std::string &stringValue) override
Sets the value of the field to stringValue.
void setValue(const Vector10 &vectorValue)
Same as setVector10Value().
void setVectorValue(const Vector10 &vectorValue)
Sets the value of the field to vectorValue.
const Vector10 & getVectorValue() const
Returns the value of the field.
const Vector10 & getVector10Value() const
Returns the value of the field.
void setVector10Value(const Vector10 &vectorValue)
Sets the value of the field to vectorValue.
void updateValue(const Vector10 &vectorValue)
Same as updateVector10Value().
void setValueFromField(const Field &field) override
Reimplementation from Field which copies the field value more efficiently.
const Vector10 & getValue() const
Same as getVector10Value().
void updateVector10Value(const Vector10 &vectorValue)
Sets the value of the field to vectorValue, but only touch field if the new value is different from t...
Vector10Field(const std::string &name)
Constructor, creates a field with a name to manage a vector of 10 double values initialized to (0,...
std::string getStringValue() const override
Returns the value of the field as string value.
Field to encapsulate a vector of 2 double values.
std::string getStringValue() const override
Returns the value of the field as a string value.
void setVectorValue(const Vector2 &vectorValue)
Sets the value of the field to vectorValue.
void setValueFromField(const Field &field) override
Reimplementation from Field which copies the field value more efficiently.
void updateValue(const Vector2 &vectorValue)
Same as updateVector2Value().
void setValue(const Vector2 &vectorValue)
Same as setVector2Value().
const Vector2 & getValue() const
Same as getVector2Value().
const Vector2 & getVectorValue() const
Returns the value of the field.
void updateVector2Value(const Vector2 &vectorValue)
Sets the value of the field to vectorValue, but only touch field if the new value is different from t...
const Vector2 & getVector2Value() const
Returns the value of the field.
Vector2Field(const std::string &name)
Constructor, creates a field with a name to manage a vector of 2 double values.
void setVector2Value(const Vector2 &vectorValue)
Sets the value of the field to vectorValue.
Vector2Field()
Implements the runtime type system interface for this class.
void setStringValue(const std::string &stringValue) override
Sets the value of the field to stringValue.
Field to encapsulate a vector of 3 double values.
void setValueFromField(const Field &field) override
Reimplementation from Field which copies the field value more efficiently.
const Vector3 & getVectorValue() const
Returns the value of the field.
void updateValue(const Vector3 &vectorValue)
Same as updateVector3Value().
void setStringValue(const std::string &stringValue) override
Sets the value of the field to stringValue.
const Vector3 & getVector3Value() const
Returns the value of the field.
void setVector3Value(const Vector3 &vectorValue)
Sets the value of the field to vectorValue.
Vector3Field(const std::string &name)
Constructor, creates a field with a name to manage a vector of 3 double values.
void updateVector3Value(const Vector3 &vectorValue)
Sets the value of the field to vectorValue, but only touch field if the new value is different from t...
Vector3Field()
Implements the runtime type system interface for this class.
const Vector3 & getValue() const
Same as getVector3Value().
void setVectorValue(const Vector3 &vectorValue)
Sets the value of the field to vectorValue.
void setValue(const Vector3 &vectorValue)
Same as setVector3Value().
std::string getStringValue() const override
Returns the value of the field as string value setStringValue must be able to reinterpret this return...
Field to encapsulate a vector of 4 double values.
std::string getStringValue() const override
Returns the value of the field as a string value.
void updateVector4Value(const Vector4 &vectorValue)
Sets the value of the field to vectorValue, but only touch field if the new value is different from t...
const Vector4 & getValue() const
Same as getVector4Value().
void setValue(const Vector4 &vectorValue)
Same as setVector4Value().
const Vector4 & getVectorValue() const
Returns the value of the field.
Vector4Field(const std::string &name)
Constructor, creates a field with a name to manage a vector of 4 double values.
void setStringValue(const std::string &stringValue) override
Sets the value of the field to stringValue.
void setVectorValue(const Vector4 &vectorValue)
Sets the value of the field to vectorValue.
void setVector4Value(const Vector4 &vectorValue)
Sets the value of the field to vectorValue.
void setValueFromField(const Field &field) override
Reimplementation from Field which copies the field value more efficiently.
void updateValue(const Vector4 &vectorValue)
Same as updateVector4Value().
const Vector4 & getVector4Value() const
Returns the value of the field.
Vector4Field()
Implements the runtime type system interface for this class.
Field to encapsulate a vector of 5 double values.
void updateValue(const Vector5 &vectorValue)
Same as updateVector5Value().
std::string getStringValue() const override
Returns the value of the field as a string value.
Vector5Field()
Implements the runtime type system interface for this class.
const Vector5 & getValue() const
Same as getVector5Value().
void setStringValue(const std::string &stringValue) override
Sets the value of the field to stringValue.
const Vector5 & getVector5Value() const
Returns the value of the field.
void setVector5Value(const Vector5 &vectorValue)
Sets the value of the field to vectorValue.
const Vector5 & getVectorValue() const
Returns the value of the field.
Vector5Field(const std::string &name)
Constructor, creates a field with a name to manage a vector of 5 double values initialized to (0,...
void setVectorValue(const Vector5 &vectorValue)
Sets the value of the field to vectorValue.
void updateVector5Value(const Vector5 &vectorValue)
Sets the value of the field to vectorValue, but only touch field if the new value is different from t...
void setValueFromField(const Field &field) override
Reimplementation from Field which copies the field value more efficiently.
void setValue(const Vector5 &vectorValue)
Same as setVector5Value().
Field to encapsulate a vector of 6 double values.
Vector6Field()
Implements the runtime type system interface for this class.
void setStringValue(const std::string &stringValue) override
Sets the value of the field to stringValue.
const Vector6 & getVectorValue() const
Returns the value of the field.
void setVectorValue(const Vector6 &vectorValue)
Sets the value of the field to vectorValue.
void updateValue(const Vector6 &vectorValue)
Same as updateVector6Value().
void updateVector6Value(const Vector6 &vectorValue)
Sets the value of the field to vectorValue, but only touch field if the new value is different from t...
void setVector6Value(const Vector6 &vectorValue)
Sets the value of the field to vectorValue.
const Vector6 & getVector6Value() const
Returns the value of the field.
void setValue(const Vector6 &vectorValue)
Same as setVector6Value().
std::string getStringValue() const override
Returns the value of the field as a string value.
Vector6Field(const std::string &name)
Constructor, creates a field with a name to manage a vector of 6 double values.
void setValueFromField(const Field &field) override
Reimplementation from Field which copies the field value more efficiently.
const Vector6 & getValue() const
Same as getVector6Value().
#define ML_ABSTRACT_CLASS_HEADER(className)
Same like ML_ABSTRACT_CLASS_HEADER_EXPORTED with a non existing export symbol.
MLint32 MLDataType
MLDataType.
#define MLEXPORT
To export symbols from a dll/shared object, we need to mark them with the MLEXPORT symbol.
#define ML_CLASS_HEADER(className)
Same like ML_CLASS_HEADER_EXPORTED with a non existing export symbol.
MLint64 * MLintPtr
A pointer to the signed ML integer type MLint.
unsigned char MLTypeData
This is the pointer type used to point to the data of MLType data instances.
MLint64 MLint
A signed ML integer type with at least 64 bits used for index calculations on very large images even ...
EnumValues< EnumType >::Entry createEnumEntry(const char *value, EnumType enumValue)
Helper method to infer the EnumType via the function signature.
MLEXPORT void MLInitFields()
Initialize all standard fields of the ML.
Defines the entry for one enum value.
EnumEntry(const std::string &sv, int v)
std::string stringValue
The string value of the entry.
int value
The enum value of the entry.
Defines the entry for one enum value.
EnumType value
The enum value of the entry.
const char * stringValue
The string value of the entry.
Entry(const char *sv, EnumType v)