open62541pp 0.16.0
C++ wrapper of open62541
Loading...
Searching...
No Matches
opcua::NodeId Class Reference

#include <types.hpp>

Inheritance diagram for opcua::NodeId:
[legend]

Detailed Description

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
 
template<typename T , typename = std::enable_if_t<detail::IsNodeIdEnum<T>::value>>
 NodeId (T identifier) 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< UA_NodeId >
constexpr Wrapper ()=default
 
constexpr Wrapper (const UA_NodeId &native)
 
constexpr Wrapper (UA_NodeId &&native) noexcept
 
constexpr operator UA_NodeId & () noexcept
 
constexpr operator const UA_NodeId & () const noexcept
 
constexpr UA_NodeIdoperator-> () noexcept
 
constexpr const UA_NodeIdoperator-> () const noexcept
 
constexpr UA_NodeIdhandle () noexcept
 
constexpr const UA_NodeIdhandle () const noexcept
 

Additional Inherited Members

- Public Types inherited from opcua::Wrapper< UA_NodeId >
using NativeType
 
- 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< UA_NodeId >
constexpr const UA_NodeIdnative () const noexcept
 
constexpr UA_NodeIdnative () noexcept
 

Constructor & Destructor Documentation

◆ NodeId() [1/6]

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

Create NodeId with numeric identifier.

Definition at line 595 of file types.hpp.

◆ NodeId() [2/6]

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

Create NodeId with String identifier from standard strings.

Definition at line 602 of file types.hpp.

◆ NodeId() [3/6]

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

Create NodeId with String identifier from String wrapper class.

Definition at line 609 of file types.hpp.

◆ NodeId() [4/6]

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

Create NodeId with Guid identifier.

Definition at line 616 of file types.hpp.

◆ NodeId() [5/6]

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

Create NodeId with ByteString identifier.

Definition at line 623 of file types.hpp.

◆ NodeId() [6/6]

template<typename T , typename = std::enable_if_t<detail::IsNodeIdEnum<T>::value>>
opcua::NodeId::NodeId ( T identifier)
inlinenoexcept

Create NodeId from enum class with numeric identifiers like opcua::ObjectId.

The namespace is retrieved by calling e.g. getNamespace(opcua::ObjectId). Make sure to provide an overload for custom enum types.

Definition at line 633 of file types.hpp.

Member Function Documentation

◆ isNull()

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

Definition at line 636 of file types.hpp.

◆ hash()

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

Definition at line 640 of file types.hpp.

◆ getNamespaceIndex()

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

Definition at line 644 of file types.hpp.

◆ getIdentifierType()

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

Definition at line 648 of file types.hpp.

◆ getIdentifier()

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

Get identifier variant.

Definition at line 653 of file types.hpp.

Referenced by getIdentifierAs().

◆ getIdentifierAs() [1/2]

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

Get identifier by template type.

Definition at line 670 of file types.hpp.

Referenced by getIdentifierAs(), and opcua::DataType::setBinaryEncodingId().

◆ getIdentifierAs() [2/2]

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

Get identifier by NodeIdType enum.

Definition at line 676 of file types.hpp.

◆ toString()

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

◆ TypeWrapper() [1/5]

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

◆ TypeWrapper() [2/5]

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

Constructor with native object (deep copy).

Definition at line 31 of file typewrapper.hpp.

◆ TypeWrapper() [3/5]

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

Constructor with native object (move rvalue).

Definition at line 35 of file typewrapper.hpp.

◆ TypeWrapper() [4/5]

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

Copy constructor (deep copy).

Definition at line 43 of file typewrapper.hpp.

◆ TypeWrapper() [5/5]

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

Move constructor.

Definition at line 47 of file typewrapper.hpp.