AbstractValueListener Class
(CDP::StudioAPI::AbstractValueListener)A template class to provide value node functionality to any base node type. More...
| Header: | #include <AbstractValueListener> |
| Inherited By: |
Public Functions
| virtual | ~AbstractValueListener() |
| virtual void | ExternalTypeError(ICDPNode *node, const std::string &error) |
| virtual void | ExternalValueLoaded(ICDPNode *node) |
| size_t | GetListeningNodesCount() const |
| virtual void | MetadataChanged(ICDPNode *node, const Metadata &newMetadata) |
| virtual void | NodeRemoved(ICDPNode *node) |
| virtual void | NodeSubscribed(ICDPNode *node) |
| void | UnsubscribeFromAllValueChanges() |
| virtual void | ValueChanged(ICDPNode *node, const CDPVariantValue &oldValue, const CDPVariantValue &newValue) = 0 |
Member Function Documentation
[virtual] AbstractValueListener::~AbstractValueListener()
Destroys the instance of AbstractValueListener. The destructor is virtual.
[virtual] void AbstractValueListener::ExternalTypeError(ICDPNode *node, const std::string &error)
Callback that gets called when the node external type has some error situation (value change can not be read or written etc). Override this method when need to know or take some actions in cases where the node external value errors happen.
Note: Only meaningful for nodes that have external type associated with them.
[virtual] void AbstractValueListener::ExternalValueLoaded(ICDPNode *node)
Callback that gets called after the node external value has been successfully loaded and is available for use. Override this method to implement when need to know when the node external value is loaded.
Note: Only meaningful for nodes that have variant value external type associated.
size_t AbstractValueListener::GetListeningNodesCount() const
Returns the number of nodes this listener is currently subscribed to for value change notifications.
[virtual] void AbstractValueListener::MetadataChanged(ICDPNode *node, const Metadata &newMetadata)
Callback that gets called after the node metadata has been changed or initially successfully loaded.
Note: Only meaningful for nodes that have metadata associated.
[virtual] void AbstractValueListener::NodeRemoved(ICDPNode *node)
Internal method called when this listener is removed from a node.
[virtual] void AbstractValueListener::NodeSubscribed(ICDPNode *node)
Internal method called when this listener is subscribed to a node.
void AbstractValueListener::UnsubscribeFromAllValueChanges()
Unsubscribe this listener from all value changes from all nodes it is currently listening to. Is called automatically on destruction.
[pure virtual] void AbstractValueListener::ValueChanged(ICDPNode *node, const CDPVariantValue &oldValue, const CDPVariantValue &newValue)
Callback that gets called after the node value has been changed from oldValue to newValue.
Get started with CDP Studio today
Let us help you take your great ideas and turn them into the products your customer will love.