![]() |
NDEVR
API Documentation
|
A class that can subscribe to any number of Resources which will get updates when the Resource(s) have been modified. More...
Public Member Functions | |
| ResourceListener () | |
| Constructs a default ResourceListener. | |
| virtual | ~ResourceListener () |
| Virtual destructor. | |
| virtual void | addInfoParent (const ResourceBase *info) |
| Registers a ResourceBase as a parent that this listener is observing. | |
| void | changeValue () |
| Triggers the value changed callback for this listener. | |
| void | disable (bool disable) |
| Enables or disables this listener. | |
| void | disconnectListener () |
| Disconnects this listener from all parent resources it is subscribed to. | |
| uint04 | getInfoParentSize () const |
| Returns the number of parent resources this listener is subscribed to. | |
| virtual void | onValueChanged ()=0 |
| Called when a subscribed resource value has changed. | |
| virtual void | removeInfoParent (const ResourceBase *info) |
| Removes a ResourceBase from the list of parents this listener is observing. | |
A class that can subscribe to any number of Resources which will get updates when the Resource(s) have been modified.
Definition at line 93 of file ResourceListener.h.
|
virtual |
Virtual destructor.
Disconnects from all parent resources.
|
virtual |
Registers a ResourceBase as a parent that this listener is observing.
| [in] | info | The resource to add as a parent. |
Reimplemented in ResourceMirror< t_type >.
Referenced by ResourceMirror< t_type >::addInfoParent().
|
inline |
Enables or disables this listener.
| [in] | disable | If true, the listener is set to active; if false, it is deactivated. |
Definition at line 144 of file ResourceListener.h.
References disable().
Referenced by disable().
|
inline |
Returns the number of parent resources this listener is subscribed to.
Definition at line 135 of file ResourceListener.h.
|
pure virtual |
Called when a subscribed resource value has changed.
Subclasses must implement this to define their response to resource updates.
Implemented in BasicResourceListener, EnvironmentalVariable, QTAbstractResourceListener, and ResourceMirror< t_type >.
|
inlinevirtual |
Removes a ResourceBase from the list of parents this listener is observing.
| [in] | info | The resource to remove as a parent. |
Reimplemented in ResourceMirror< t_type >.
Definition at line 126 of file ResourceListener.h.
Referenced by ResourceMirror< t_type >::removeInfoParent().