13 #ifndef ML_FIELD_SENSOR_H
14 #define ML_FIELD_SENSOR_H
88 void attachFieldInternal(
Field* field);
91 Field* _attachedField;
Class to define and to manage field sensors.
virtual ~FieldSensor()
Destructor: Disconnects field sensor from the connected field.
FieldSensor(MLSensorCB *callbackFunction, void *userData)
Creates a field sensor with callback function callbackFunction and a parameter userData.
void attachField(Field *field)
Attaches a field sensor to a the field field.
void callback(Strength notificationStrength=CHANGED)
Executes the callback function set by the constructor.
Strength getNotificationStrength() const
Returns the notification level, i.e., how strong the current notification is.
void detachField()
Detaches the field sensor from the most recently attached field.
Field * getField() const
Returns the field connected to the field sensor.
Strength
Enumeration type describing the strength of notifications.
Base class for all fields used in the ML.
#define MLEXPORT
To export symbols from a DLL/shared object, we need to mark them with the MLEXPORT symbol.
void MLSensorCB(void *usrData, void *sensor)