23 class OutputConnectorField;
75 Field(
const std::string& name = std::string());
96 const std::string&
getName()
const {
return _name; }
99 void setName(
const std::string& name) { _name = name; }
107 bool isOutputOnly()
const;
110 void setOutputOnly(
bool outputOnly =
true);
120 virtual void setStringValue(
const std::string& value) =0;
128 virtual std::string getStringValue()
const =0;
139 void copyCStringValue(
char* valueBuffer,
MLint bufferSize);
157 void detachFieldSensors();
164 void attachField(
BaseField* targetField);
171 void attachField(
Field* targetField,
bool propagateValueOnConnect);
174 void detachField(
Field* targetField);
177 void detachSourceFields();
180 void detachDestinationFields();
183 void detachAllFields();
186 size_t getNumDestinationFields();
189 Field* getDestinationField(
size_t index);
192 size_t getNumSourceFields();
195 Field* getSourceField(
size_t index);
216 void enableNotifications(
bool flag);
220 bool areNotificationsEnabled();
228 static void enableNotificationsGlobally(
bool flag);
235 static bool areNotificationsEnabledGlobally();
241 static MLint& enableNotificationsCounterState();
247 void attachSourceField(
Field* field);
250 void detachSourceField(
Field* field);
253 void detachFieldInternal(
Field* field);
258 virtual void setValueFromField(
const Field& field);
279 unsigned int observersWereRemovedInsideTouch:1;
280 unsigned int insideTouch:1;
281 unsigned int notifyAttachmentsFlag:1;
282 unsigned int outputOnly:1;
294 void setFieldContainer(
FieldContainer* container) { _fieldContainer = container; }
309 #define notifyAttachments touch
311 #if defined(WIN32) && defined(ML_WARN_DEPRECATED)
312 #pragma deprecated("notifyAttachments")
336 #endif // ML_DEPRECATED
356 #endif // __mlField_H
MLint getCStringValueSize()
Returns the length of the character string of the string value of the field.
Defines the class FieldSensor to realize the concept of field sensors which can observe fields...
Strength
Enumeration type describing the strength of notifications.
virtual MLint isValidValue()
Returns true (=1) if the field's value is valid; otherwise false (=0) is returned.
void activateAttachments()
FieldContainer * _fieldContainer
The owning field container.
Field to encapsulate a pointer to an SoNode instance of OpenInventor.
MLint64 MLint
A signed ML integer type with at least 64 bits used for index calculations on very large images even ...
static void enableNotifications()
Defines system-specific macros for this project/DLL.
std::vector< FieldSensor * > _sensors
List of field sensors.
#define MLEXPORT
To export symbols from a dll/shared object, we need to mark them with the MLEXPORT symbol...
static void disableNotifications()
static MLint _enableNotifications
Flag which disables the notification process of field (sensors) globally.
Base class for all fields used in the ML.
std::vector< Field * > _destinationFields
List of (target) fields which shall be set to the value of this field or which shall be notified only...
Field to encapsulate a pointer to an ML base object.
Flags for internal usage.
std::vector< Field * > _sourceFields
List of (source) fields, which will notify this field or which will copy their value to this field...
FieldContainer * getFieldContainer() const
Get the field container of the field (which may be NULL).
This file defines macros, which are inserted in classes to declare and implement additional class mem...
std::ostream & operator<<(std::ostream &out, const ml::Variant &variant)
static MLint isEnabledNotifications()
void deactivateAttachments()
Defines the class FieldContainer to encapsulate a vector of fields for (see class Field)...
void setName(const std::string &name)
Sets the name of field. Should be called only once after or while construction.
Field to encapsulate a pointer to an output connector which represents a module output.
Class to define and to manage field sensors.
#define ML_ABSTRACT_CLASS_HEADER(className)
Same like ML_ABSTRACT_CLASS_HEADER_EXPORTED with a non existing export symbol.
Field without value for notifications.
const std::string & getName() const
Returns name of field.
MLint isActiveAttachments()
std::string _name
The name of this field.