open62541++ 0.13.0
C++ wrapper of open62541
Loading...
Searching...
No Matches
Public Member Functions | List of all members
opcua::NodeId Class Reference

#include <NodeId.h>

Inheritance diagram for opcua::NodeId:
[legend]

Detailed Description

UA_NodeId wrapper class.

See also
https://reference.opcfoundation.org/Core/Part3/v105/docs/8.2
Examples
events/client_eventfilter.cpp, server_accesscontrol.cpp, and server_valuecallback.cpp.

Definition at line 36 of file NodeId.h.

Public Member Functions

 NodeId (NamespaceIndex namespaceIndex, uint32_t identifier) noexcept
 
 NodeId (NamespaceIndex namespaceIndex, std::string_view identifier)
 
 NodeId (NamespaceIndex namespaceIndex, String identifier) noexcept
 
 NodeId (NamespaceIndex namespaceIndex, Guid identifier) noexcept
 
 NodeId (NamespaceIndex namespaceIndex, ByteString identifier) noexcept
 
 NodeId (Type type) noexcept
 
 NodeId (DataTypeId id) noexcept
 
 NodeId (ReferenceTypeId id) noexcept
 
 NodeId (ObjectTypeId id) noexcept
 
 NodeId (VariableTypeId id) noexcept
 
 NodeId (ObjectId id) noexcept
 
 NodeId (VariableId id) noexcept
 
 NodeId (MethodId id) noexcept
 
bool isNull () const noexcept
 
uint32_t hash () const noexcept
 
NamespaceIndex getNamespaceIndex () const noexcept
 
NodeIdType getIdentifierType () const noexcept
 
std::variant< uint32_t, String, Guid, ByteStringgetIdentifier () const
 
template<typename T >
auto getIdentifierAs () const
 
template<NodeIdType E>
auto getIdentifierAs () const
 
std::string toString () const
 
constexpr TypeWrapper ()=default
 
constexpr TypeWrapper (const T &native)
 
constexpr TypeWrapper (T &&native) noexcept
 
constexpr TypeWrapper (const TypeWrapper &other)
 
constexpr TypeWrapper (TypeWrapper &&other) noexcept
 
- Public Member Functions inherited from opcua::TypeWrapper< UA_NodeId, UA_TYPES_NODEID >
constexpr TypeWrapper ()=default
 
constexpr TypeWrapper (const UA_NodeId &native)
 
constexpr TypeWrapper (UA_NodeId &&native) noexcept
 
constexpr TypeWrapper (const TypeWrapper &other)
 
constexpr TypeWrapper (TypeWrapper &&other) noexcept
 
 ~TypeWrapper ()
 
constexpr TypeWrapperoperator= (const TypeWrapper &other)
 
constexpr TypeWrapperoperator= (const UA_NodeId &native)
 
constexpr TypeWrapperoperator= (TypeWrapper &&other) noexcept
 
constexpr TypeWrapperoperator= (UA_NodeId &&native) noexcept
 
constexpr void swap (TypeWrapper &other) noexcept
 
constexpr void swap (UA_NodeId &native) noexcept
 
- Public Member Functions inherited from opcua::Wrapper< T >
constexpr Wrapper ()=default
 
constexpr Wrapper (const T &native)
 
constexpr Wrapper (T &&native) noexcept
 
constexpr operator T& () noexcept
 
constexpr operator const T & () const noexcept
 
constexpr T * operator-> () noexcept
 
constexpr const T * operator-> () const noexcept
 
constexpr T * handle () noexcept
 
constexpr const T * handle () const noexcept
 

Additional Inherited Members

- Public Types inherited from opcua::Wrapper< T >
using NativeType = T
 
- Static Public Member Functions inherited from opcua::TypeWrapper< UA_NodeId, UA_TYPES_NODEID >
static constexpr TypeIndex getTypeIndex ()
 
- Protected Member Functions inherited from opcua::TypeWrapper< UA_NodeId, UA_TYPES_NODEID >
constexpr void clear () noexcept
 
- Protected Member Functions inherited from opcua::Wrapper< T >
constexpr const T & native () const noexcept
 
constexpr T & native () noexcept
 

Constructor & Destructor Documentation

◆ NodeId() [1/13]

opcua::NodeId::NodeId ( NamespaceIndex namespaceIndex,
uint32_t identifier )
inlinenoexcept

Create NodeId with numeric identifier.

Definition at line 41 of file NodeId.h.

◆ NodeId() [2/13]

opcua::NodeId::NodeId ( NamespaceIndex namespaceIndex,
std::string_view identifier )
inline

Create NodeId with String identifier from standard strings.

Definition at line 48 of file NodeId.h.

◆ NodeId() [3/13]

opcua::NodeId::NodeId ( NamespaceIndex namespaceIndex,
String identifier )
inlinenoexcept

Create NodeId with String identifier from String wrapper class.

Definition at line 55 of file NodeId.h.

◆ NodeId() [4/13]

opcua::NodeId::NodeId ( NamespaceIndex namespaceIndex,
Guid identifier )
inlinenoexcept

Create NodeId with Guid identifier.

Definition at line 62 of file NodeId.h.

◆ NodeId() [5/13]

opcua::NodeId::NodeId ( NamespaceIndex namespaceIndex,
ByteString identifier )
inlinenoexcept

Create NodeId with ByteString identifier.

Definition at line 69 of file NodeId.h.

◆ NodeId() [6/13]

opcua::NodeId::NodeId ( Type type)
inlinenoexcept

Create NodeId from Type (type id).

Deprecated
Use the constructor NodeId(DataTypeId) instead, the Type enum will be removed

Definition at line 78 of file NodeId.h.

◆ NodeId() [7/13]

opcua::NodeId::NodeId ( DataTypeId id)
inlinenoexcept

Create NodeId from DataTypeId.

Definition at line 82 of file NodeId.h.

◆ NodeId() [8/13]

opcua::NodeId::NodeId ( ReferenceTypeId id)
inlinenoexcept

Create NodeId from ReferenceTypeId.

Definition at line 86 of file NodeId.h.

◆ NodeId() [9/13]

opcua::NodeId::NodeId ( ObjectTypeId id)
inlinenoexcept

Create NodeId from ObjectTypeId.

Definition at line 90 of file NodeId.h.

◆ NodeId() [10/13]

opcua::NodeId::NodeId ( VariableTypeId id)
inlinenoexcept

Create NodeId from VariableTypeId.

Definition at line 94 of file NodeId.h.

◆ NodeId() [11/13]

opcua::NodeId::NodeId ( ObjectId id)
inlinenoexcept

Create NodeId from ObjectId.

Definition at line 98 of file NodeId.h.

◆ NodeId() [12/13]

opcua::NodeId::NodeId ( VariableId id)
inlinenoexcept

Create NodeId from VariableId.

Definition at line 102 of file NodeId.h.

◆ NodeId() [13/13]

opcua::NodeId::NodeId ( MethodId id)
inlinenoexcept

Create NodeId from MethodId.

Definition at line 106 of file NodeId.h.

Member Function Documentation

◆ isNull()

bool opcua::NodeId::isNull ( ) const
inlinenoexcept

Definition at line 109 of file NodeId.h.

◆ hash()

uint32_t opcua::NodeId::hash ( ) const
inlinenoexcept

Definition at line 113 of file NodeId.h.

◆ getNamespaceIndex()

NamespaceIndex opcua::NodeId::getNamespaceIndex ( ) const
inlinenoexcept

Definition at line 117 of file NodeId.h.

Referenced by opcua::services::addNodeAsync().

◆ getIdentifierType()

NodeIdType opcua::NodeId::getIdentifierType ( ) const
inlinenoexcept

Definition at line 121 of file NodeId.h.

◆ getIdentifier()

std::variant< uint32_t, String, Guid, ByteString > opcua::NodeId::getIdentifier ( ) const
inline

Get identifier variant.

Definition at line 126 of file NodeId.h.

Referenced by getIdentifierAs().

◆ getIdentifierAs() [1/2]

template<typename T >
auto opcua::NodeId::getIdentifierAs ( ) const
inline

Get identifier by template type.

Definition at line 143 of file NodeId.h.

Referenced by opcua::DataType::setBinaryEncodingId().

◆ getIdentifierAs() [2/2]

template<NodeIdType E>
auto opcua::NodeId::getIdentifierAs ( ) const
inline

Get identifier by NodeIdType enum.

Definition at line 149 of file NodeId.h.

◆ toString()

std::string opcua::NodeId::toString ( ) const

◆ TypeWrapper() [1/5]

constexpr opcua::TypeWrapper< T, typeIndex >::TypeWrapper ( )
constexprdefault

◆ TypeWrapper() [2/5]

constexpr opcua::TypeWrapper< T, typeIndex >::TypeWrapper ( const T & native)
inlineexplicitconstexpr

Constructor with native object (deep copy).

Definition at line 36 of file TypeWrapper.h.

◆ TypeWrapper() [3/5]

constexpr opcua::TypeWrapper< T, typeIndex >::TypeWrapper ( T && native)
inlineconstexprnoexcept

Constructor with native object (move rvalue).

Definition at line 40 of file TypeWrapper.h.

◆ TypeWrapper() [4/5]

constexpr opcua::TypeWrapper< T, typeIndex >::TypeWrapper ( const TypeWrapper & other)
inlineconstexpr

Copy constructor (deep copy).

Definition at line 48 of file TypeWrapper.h.

◆ TypeWrapper() [5/5]

constexpr opcua::TypeWrapper< T, typeIndex >::TypeWrapper ( TypeWrapper && other)
inlineconstexprnoexcept

Move constructor.

Definition at line 52 of file TypeWrapper.h.