13#ifndef ML_FIELD_SENSOR_H
14#define ML_FIELD_SENSOR_H
89 void attachFieldInternal(
Field* field);
92 Field* _attachedField;
Class to define and to manage field sensors.
virtual ~FieldSensor()
Destructor: Disconnects field sensor from the connected field and clear.
FieldSensor(MLSensorCB *callbackFunction, void *userData)
Creates a field sensor with callback function callback 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.
Strength
Enumeration type describing the strength of notifications.
Field * getField() const
Returns the field connected to the field sensor.
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)