33#include <NDEVR/Resource.h>
40 template<
class t_type>
55 b.addListener(
this,
true);
A base class for templated resources.
virtual void removeInfoParent(const ResourceBase *info)
Removes a ResourceBase from the list of parents this listener is observing.
ResourceListener()
Constructs a default ResourceListener.
virtual void addInfoParent(const ResourceBase *info)
Registers a ResourceBase as a parent that this listener is observing.
void disconnectListener()
Disconnects this listener from all parent resources it is subscribed to.
t_type value
The last known synchronized value, used to detect which resource changed.
Resource< t_type > & a
The first mirrored resource.
virtual void addInfoParent(const ResourceBase *info) override
Registers a parent resource that this listener depends on.
virtual void removeInfoParent(const ResourceBase *info) override
Removes a parent resource and disconnects this listener.
virtual void onValueChanged() override
Called when either mirrored resource changes.
ResourceMirror(Resource< t_type > &a, Resource< t_type > &b)
Constructs a ResourceMirror that synchronizes two resources bidirectionally.
virtual ~ResourceMirror()
Destructor.
Resource< t_type > & b
The second mirrored resource.
A core part of the engine, stores variables that can be listened to with ResourceListener which will ...
The primary namespace for the NDEVR SDK.