CVB++ 15.0
Node Class Reference

Basic GenApi node for device feature access. More...

#include <cvb/genapi/node.hpp>

Inherited by PortNode, RegisterNode, and ValueNode.

Public Member Functions

void * Handle () const noexcept
 Classic API node handle. More...
 
String Name () const
 Gets the full name of this node. More...
 
String DisplayName () const
 Gets the display name of this node. More...
 
String ToolTip () const
 Gets the short descriptive text of this node. More...
 
String Description () const
 Gets the long descriptive text of this node. More...
 
Cvb::GenApi::AccessMode AccessMode () const
 Gets the access mode of this node. More...
 
bool IsImplemented () const
 Helper to check whether this node is implemented. More...
 
bool IsAvailable () const
 Helper to check whether this node is available. More...
 
bool IsReadable () const
 Helper to check whether this node is readable. More...
 
bool IsWriteable () const
 Helper to check whether this node is writable. More...
 
Cvb::GenApi::CacheMode CacheMode () const
 Gets the cache mode of this node. More...
 
String EventID () const
 Nodes with an event identifier may become invalidated, if an event / message is delivered from the device. More...
 
bool IsFeature () const
 Returns whether this node is considered a feature node. More...
 
bool IsDeprecated () const
 Gets whether this node is considered deprecated. More...
 
Cvb::GenApi::Visibility Visibility () const
 Gets the complexity level of this node. More...
 
NodePtr AliasNode () const
 Gets the node, that is an alias value for this node. More...
 
EventCookie RegisterEventUpdated (std::function< void(Node &)> handler)
 Register a listener to node updated event. More...
 
void UnregisterEventUpdated (EventCookie eventCookie) noexcept
 Manually unregister a listener to the node updated event. More...
 
NodeMapPtr NodeMap () const noexcept
 Gets the node map this node resides in. More...
 

Detailed Description

Basic GenApi node for device feature access.

Example

Member Function Documentation

◆ AccessMode()

Gets the access mode of this node.

Returns
Current access mode.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ AliasNode()

NodePtr AliasNode ( ) const
inline

Gets the node, that is an alias value for this node.

Returns
pointer to alias node instance; null pointer for none.
Exceptions
Anyexception derived from std::exception including CvbException.

Alias nodes give an additional view on a value or can contain summary information for e.g. CategoryNodes.

◆ CacheMode()

Gets the cache mode of this node.

Returns
The current cache mode.
Exceptions
Anyexception derived from std::exception including CvbException.

For non-register nodes the cache mode of the register in the value path of the node chain up the the register is used.

◆ Description()

String Description ( ) const
inline

Gets the long descriptive text of this node.

Returns
Long descriptive text.
Exceptions
Anyexception derived from std::exception including CvbException.

See ToolTip() for the short description.

◆ DisplayName()

String DisplayName ( ) const
inline

Gets the display name of this node.

Returns
Display name including namespace.
Exceptions
Anyexception derived from std::exception including CvbException.

String containing the name to display.

◆ EventID()

String EventID ( ) const
inline

Nodes with an event identifier may become invalidated, if an event / message is delivered from the device.

Returns
The event ID as string.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ Handle()

void * Handle ( ) const
inlinenoexcept

Classic API node handle.

Returns
Classic API handle.
Exceptions
Doesnot throw any exception.

It is normally not necessary to work with this handle.

◆ IsAvailable()

bool IsAvailable ( ) const
inline

Helper to check whether this node is available.

Returns
True if the node is available, otherwise false.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ IsDeprecated()

bool IsDeprecated ( ) const
inline

Gets whether this node is considered deprecated.

Returns
True if the node is deprecated, otherwise false.
Exceptions
Anyexception derived from std::exception including CvbException.

Deprecated nodes are only available because of backward compatibility. New applications should not use these features.

◆ IsFeature()

bool IsFeature ( ) const
inline

Returns whether this node is considered a feature node.

Returns
True if the node is a feature node, otherwise false.
Exceptions
Anyexception derived from std::exception including CvbException.

Feature nodes are in a way public / user interface nodes. All nodes, that are directly referenced by the root node or other CategoryNodes, are considered features.

◆ IsImplemented()

bool IsImplemented ( ) const
inline

Helper to check whether this node is implemented.

Returns
True if the node is implemented, otherwise false.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ IsReadable()

bool IsReadable ( ) const
inline

Helper to check whether this node is readable.

Returns
True if the node is readable, otherwise false.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ IsWriteable()

bool IsWriteable ( ) const
inline

Helper to check whether this node is writable.

Returns
True if the node is writable, otherwise false.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ Name()

String Name ( ) const
inline

Gets the full name of this node.

Returns
Name including namespace.
Exceptions
Anyexception derived from std::exception including CvbException.

String containing the namespace of the node (Std or Cust and the node name separated by double colons (::)).

◆ NodeMap()

NodeMapPtr NodeMap ( ) const
inlinenoexcept

Gets the node map this node resides in.

Returns
A constant pointer to the node map.
Exceptions
Doesnot throw any exception.

◆ RegisterEventUpdated()

EventCookie RegisterEventUpdated ( std::function< void(Node &)>  handler)
inline

Register a listener to node updated event.

Parameters
[in]handlerListener to node updated event.
Returns
Event cookie to manually unregister the listener.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ ToolTip()

String ToolTip ( ) const
inline

Gets the short descriptive text of this node.

Returns
The tool tip text.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ UnregisterEventUpdated()

void UnregisterEventUpdated ( EventCookie  eventCookie)
inlinenoexcept

Manually unregister a listener to the node updated event.

Parameters
[in]eventCookieeventCookie Event cookie, obtained from registering the listener.
Exceptions
Doesnot throw any exception.

◆ Visibility()

Gets the complexity level of this node.

Returns
The visibility of this node.
Exceptions
Anyexception derived from std::exception including CvbException.