open62541pp 0.18.0
C++ wrapper of open62541
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
opcua::Variant Class Reference

#include <types.hpp>

Inheritance diagram for opcua::Variant:
[legend]

Detailed Description

UA_Variant wrapper class.

Variants may contain scalar values or arrays of any type together with a type definition. The standard mandates that variants contain built-in data types only. open62541 transparently handles this wrapping in the encoding layer. If the type is unknown to the receiver, the variant stores the original ExtensionObject in binary or XML encoding.

open62541pp enhances variant handling with the following features:

  1. Type category detection: Identifies whether T is scalar or array:

    • Scalar, if T is:
    • Array, if T is a container type (e.g. std::vector or std::list) and does not satisfy the criterias of a scalar type.

    Applied in constructors, assign, and to functions:

    opcua::Variant var(5); // set scalar (via constructor)
    auto value = var.to<int>(); // convert scalar
    std::array<int> array{1, 2, 3};
    var.assign(array); // set array (via assign)
    auto vec = var.to<std::vector<int>>(); // convert array
    UA_Variant wrapper class.
    Definition types.hpp:1193
    Span< T > array()
    Get reference to array with given template type (only native or wrapper types).
    Definition types.hpp:1597
  2. Type definition retrieval: Automatically retrieves UA_DataType via TypeRegistry. For every registered type T, the type definition parameter can be omitted:

    opcua::Variant var(5, UA_TYPES[UA_TYPES_INT]); // explicit type definition
    opcua::Variant var(5); // auto-detected type definition
  3. Type conversion: Convert non-native types using TypeConverter. Native UA_* types can be assigned and retrieved to/from variants without any conversion, because their binary layout is described by the type definition (UA_DataType). The same is true for wrapper types, that share the exact memory layout as their wrapped native type. Non-native types, like std::string from the STL, may not be describeable by UA_DataType because their memory layout is an implementation detail. Instead, the conversion between non-native and native types can be defined with template specializations of TypeConverter. If a type is convertible (TypeConverter specialization), the Variant automatically manages the conversion, requiring a copy:

    opcua::Variant var(std::string("test")); // convert to native type (copy)
    auto& native = var.scalar<opcua::String>(); // reference to native type (no copy)
    auto str = var.to<std::string>(); // conversion (copy required)
    UA_String wrapper class.
    Definition types.hpp:257
    constexpr const T & native() const noexcept
    Definition wrapper.hpp:102
Examples
custom_datatypes/client_custom_datatypes.cpp, method/client_method_async.cpp, server_accesscontrol.cpp, server_datasource.cpp, and typeconversion.cpp.

Definition at line 1193 of file types.hpp.

Public Member Functions

template<typename T , typename = std::enable_if_t<!std::is_const_v<T>>>
 Variant (T *ptr) noexcept
 
template<typename T , typename = std::enable_if_t<!std::is_const_v<T>>>
 Variant (T *ptr, const UA_DataType &type) noexcept
 
template<typename T , typename = std::enable_if_t<!isVariant<T>>>
 Variant (const T &value)
 
template<typename T >
 Variant (const T &value, const UA_DataType &type)
 
template<typename InputIt >
 Variant (InputIt first, InputIt last)
 
template<typename InputIt >
 Variant (InputIt first, InputIt last, const UA_DataType &type)
 
constexpr TypeWrapper () noexcept=default
 
constexpr TypeWrapper (const T &native)
 
constexpr TypeWrapper (T &&native) noexcept
 
constexpr TypeWrapper (const TypeWrapper &other)
 
constexpr TypeWrapper (TypeWrapper &&other) noexcept
 
Modifiers

Modify internal scalar/array value.

void assign (std::nullptr_t ptr) noexcept=delete
 
void assign (std::nullptr_t ptr, const UA_DataType &type) noexcept=delete
 
template<typename T , typename = std::enable_if_t<!std::is_const_v<T>>>
void assign (T *ptr) noexcept
 
template<typename T , typename = std::enable_if_t<!std::is_const_v<T>>>
void assign (T *ptr, const UA_DataType &type) noexcept
 
template<typename T >
void assign (const T &value)
 
template<typename T >
void assign (const T &value, const UA_DataType &type)
 
template<typename InputIt >
void assign (InputIt first, InputIt last)
 
template<typename InputIt >
void assign (InputIt first, InputIt last, const UA_DataType &type)
 
template<typename T , typename = std::enable_if_t<!isVariant<T>>>
Variantoperator= (T *value) noexcept
 
template<typename T , typename = std::enable_if_t<!isVariant<T>>>
Variantoperator= (const T &value)
 
template<typename T , typename... Args>
void setScalar (T &value, Args &&... args) noexcept
 
template<typename T , typename... Args>
void setScalarCopy (const T &value, Args &&... args)
 
template<typename T , typename... Args>
void setArray (T &array, Args &&... args) noexcept
 
template<typename T , typename... Args>
void setArrayCopy (const T &array, Args &&... args)
 
template<typename InputIt , typename... Args>
void setArrayCopy (InputIt first, InputIt last, Args &&... args)
 
Observers

Check the type category, type definition and array structure of the internal value.

bool empty () const noexcept
 
bool isEmpty () const noexcept
 
bool isScalar () const noexcept
 
bool isArray () const noexcept
 
bool isType (const UA_DataType *type) const noexcept
 
bool isType (const UA_DataType &type) const noexcept
 
bool isType (const NodeId &id) const noexcept
 
template<typename T >
bool isType () const noexcept
 
const UA_DataTypetype () const noexcept
 
const UA_DataTypegetDataType () const noexcept
 
size_t arrayLength () const noexcept
 
size_t getArrayLength () const noexcept
 
Span< const uint32_t > arrayDimensions () const noexcept
 
Span< const uint32_t > getArrayDimensions () const noexcept
 
Accessors

Access and convert internal scalar/array value.

void * data () noexcept
 
const void * data () const noexcept
 
template<typename T >
T & scalar () &
 
template<typename T >
const T & scalar () const &
 
template<typename T >
T && scalar () &&
 
template<typename T >
const T && scalar () const &&
 
template<typename T >
T & getScalar ()
 
template<typename T >
const T & getScalar () const
 
template<typename T >
getScalarCopy () const
 
template<typename T >
Span< T > array ()
 
template<typename T >
Span< const T > array () const
 
template<typename T >
Span< T > getArray ()
 
template<typename T >
Span< const T > getArray () const
 
template<typename T >
std::vector< T > getArrayCopy () const
 
template<typename T >
to () const
 
- Public Member Functions inherited from opcua::TypeWrapper< UA_Variant, UA_TYPES_VARIANT >
constexpr TypeWrapper () noexcept=default
 
constexpr TypeWrapper (const UA_Variant &native)
 
constexpr TypeWrapper (UA_Variant &&native) noexcept
 
constexpr TypeWrapper (const TypeWrapper &other)
 
constexpr TypeWrapper (TypeWrapper &&other) noexcept
 
 ~TypeWrapper ()
 
constexpr TypeWrapperoperator= (const TypeWrapper &other)
 
constexpr TypeWrapperoperator= (const UA_Variant &native)
 
constexpr TypeWrapperoperator= (TypeWrapper &&other) noexcept
 
constexpr TypeWrapperoperator= (UA_Variant &&native) noexcept
 
- Public Member Functions inherited from opcua::Wrapper< T >
constexpr Wrapper () noexcept=default
 
constexpr Wrapper (const T &native) noexcept
 
constexpr Wrapper (T &&native) noexcept
 
constexpr Wrapperoperator= (const T &native) noexcept
 
constexpr Wrapperoperator= (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
 
constexpr void swap (Wrapper &other) noexcept
 
constexpr void swap (T &native) noexcept
 

Static Public Member Functions

template<VariantPolicy Policy = VariantPolicy::Copy, typename T , typename... Args>
static Variant fromScalar (T &&value, Args &&... args)
 
template<VariantPolicy Policy = VariantPolicy::Copy, typename T , typename... Args>
static Variant fromArray (T &&array, Args &&... args)
 
template<VariantPolicy Policy = VariantPolicy::Copy, typename InputIt , typename... Args>
static Variant fromArray (InputIt first, InputIt last, Args &&... args)
 
- Static Public Member Functions inherited from opcua::TypeWrapper< UA_Variant, UA_TYPES_VARIANT >
static constexpr TypeIndex typeIndex ()
 

Additional Inherited Members

- Public Types inherited from opcua::Wrapper< T >
using NativeType = T
 
- Protected Member Functions inherited from opcua::TypeWrapper< UA_Variant, UA_TYPES_VARIANT >
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

◆ Variant() [1/6]

template<typename T , typename = std::enable_if_t<!std::is_const_v<T>>>
opcua::Variant::Variant ( T *  ptr)
inlineexplicitnoexcept

Create Variant from a pointer to a scalar/array (no copy).

See also
assign(T*)

Definition at line 1206 of file types.hpp.

◆ Variant() [2/6]

template<typename T , typename = std::enable_if_t<!std::is_const_v<T>>>
opcua::Variant::Variant ( T *  ptr,
const UA_DataType type 
)
inlinenoexcept

Create Variant from a pointer to a scalar/array with a custom data type (no copy).

See also
assign(T*, const UA_DataType&)

Definition at line 1213 of file types.hpp.

◆ Variant() [3/6]

template<typename T , typename = std::enable_if_t<!isVariant<T>>>
opcua::Variant::Variant ( const T &  value)
inlineexplicit

Create Variant from a scalar/array (copy).

See also
assign(const T&)

Definition at line 1220 of file types.hpp.

◆ Variant() [4/6]

template<typename T >
opcua::Variant::Variant ( const T &  value,
const UA_DataType type 
)
inline

Create Variant from a scalar/array with a custom data type (copy).

See also
assign(const T&, const UA_DataType&)

Definition at line 1227 of file types.hpp.

◆ Variant() [5/6]

template<typename InputIt >
opcua::Variant::Variant ( InputIt  first,
InputIt  last 
)
inline

Create Variant from a range of elements (copy).

See also
assign(InputIt, InputIt)

Definition at line 1234 of file types.hpp.

◆ Variant() [6/6]

template<typename InputIt >
opcua::Variant::Variant ( InputIt  first,
InputIt  last,
const UA_DataType type 
)
inline

Create Variant from a range of elements with a custom data type (copy).

See also
assign(InputIt, InputIt, const UA_DataType&)

Definition at line 1241 of file types.hpp.

Member Function Documentation

◆ fromScalar()

template<VariantPolicy Policy = VariantPolicy::Copy, typename T , typename... Args>
static Variant opcua::Variant::fromScalar ( T &&  value,
Args &&...  args 
)
inlinestatic
Deprecated:
Use new universal Variant constructor instead

Definition at line 1248 of file types.hpp.

◆ fromArray() [1/2]

template<VariantPolicy Policy = VariantPolicy::Copy, typename T , typename... Args>
static Variant opcua::Variant::fromArray ( T &&  array,
Args &&...  args 
)
inlinestatic
Deprecated:
Use new universal Variant constructor instead

Definition at line 1259 of file types.hpp.

◆ fromArray() [2/2]

template<VariantPolicy Policy = VariantPolicy::Copy, typename InputIt , typename... Args>
static Variant opcua::Variant::fromArray ( InputIt  first,
InputIt  last,
Args &&...  args 
)
inlinestatic
Deprecated:
Use new universal Variant constructor instead

Definition at line 1270 of file types.hpp.

◆ assign() [1/8]

void opcua::Variant::assign ( std::nullptr_t  ptr)
deletenoexcept

◆ assign() [2/8]

void opcua::Variant::assign ( std::nullptr_t  ptr,
const UA_DataType type 
)
deletenoexcept

◆ assign() [3/8]

template<typename T , typename = std::enable_if_t<!std::is_const_v<T>>>
void opcua::Variant::assign ( T *  ptr)
inlinenoexcept

Assign pointer to scalar/array to variant (no copy).

The object will not be deleted when the Variant is destructed.

Parameters
ptrNon-const pointer to a value to assign to the variant. This can be:
  • A pointer to a scalar native or wrapper value.
  • A pointer to a contiguous container such as std::array or std::vector holding native or wrapper elements. The underlying array must be accessible with std::data and std::size.
  • A nullptr, in which case the variant will be cleared.

Definition at line 1294 of file types.hpp.

◆ assign() [4/8]

template<typename T , typename = std::enable_if_t<!std::is_const_v<T>>>
void opcua::Variant::assign ( T *  ptr,
const UA_DataType type 
)
inlinenoexcept

Assign pointer to scalar/array to variant with custom data type (no copy).

The object will not be deleted when the Variant is destructed.

Parameters
ptrNon-const pointer to a value to assign to the variant. This can be:
  • A pointer to a scalar native or wrapper value.
  • A pointer to a contiguous container such as std::array or std::vector holding native or wrapper elements. The underlying array must be accessible with std::data and std::size.
  • A nullptr, in which case the variant will be cleared.
typeCustom data type.

Definition at line 1311 of file types.hpp.

◆ assign() [5/8]

template<typename T >
void opcua::Variant::assign ( const T &  value)
inline

Assign scalar/array to variant (copy and convert if required).

Parameters
valueValue to copy to the variant. It can be:
  • A scalar native, wrapper or convertible value.
  • A container with native, wrapper or convertible elements. The container must implement begin() and end().

Definition at line 1329 of file types.hpp.

◆ assign() [6/8]

template<typename T >
void opcua::Variant::assign ( const T &  value,
const UA_DataType type 
)
inline

Assign scalar/array to variant with custom data type (copy).

Parameters
valueValue to copy to the variant. It can be:
  • A scalar native or wrapper value.
  • A container with native or wrapper elements. The container must implement begin() and end().
typeCustom data type.

Definition at line 1351 of file types.hpp.

◆ assign() [7/8]

template<typename InputIt >
void opcua::Variant::assign ( InputIt  first,
InputIt  last 
)
inline

Assign range to variant (copy and convert if required).

Parameters
firstIterator to the beginning of the range.
lastIterator to the end of the range.
Template Parameters
InputItIterator of a container with native, wrapper or convertible elements.

Definition at line 1366 of file types.hpp.

◆ assign() [8/8]

template<typename InputIt >
void opcua::Variant::assign ( InputIt  first,
InputIt  last,
const UA_DataType type 
)
inline

Assign range to variant with custom data type (copy).

Parameters
firstIterator to the beginning of the range.
lastIterator to the end of the range.
typeCustom data type.
Template Parameters
InputItIterator of a container with native or wrapper elements.

Definition at line 1384 of file types.hpp.

◆ operator=() [1/2]

template<typename T , typename = std::enable_if_t<!isVariant<T>>>
Variant & opcua::Variant::operator= ( T *  value)
inlinenoexcept

Assign pointer to scalar/array to variant (no copy).

See also
assign(T*)

Definition at line 1391 of file types.hpp.

◆ operator=() [2/2]

template<typename T , typename = std::enable_if_t<!isVariant<T>>>
Variant & opcua::Variant::operator= ( const T &  value)
inline

Assign scalar/array to variant (copy and convert if required).

See also
assign(const T&)

Definition at line 1399 of file types.hpp.

◆ setScalar()

template<typename T , typename... Args>
void opcua::Variant::setScalar ( T &  value,
Args &&...  args 
)
inlinenoexcept
Deprecated:
Use assign overload with pointer instead

Definition at line 1407 of file types.hpp.

◆ setScalarCopy()

template<typename T , typename... Args>
void opcua::Variant::setScalarCopy ( const T &  value,
Args &&...  args 
)
inline
Deprecated:
Use assign overload instead

Definition at line 1414 of file types.hpp.

◆ setArray()

template<typename T , typename... Args>
void opcua::Variant::setArray ( T &  array,
Args &&...  args 
)
inlinenoexcept
Deprecated:
Use assign overload with pointer instead

Definition at line 1421 of file types.hpp.

◆ setArrayCopy() [1/2]

template<typename T , typename... Args>
void opcua::Variant::setArrayCopy ( const T &  array,
Args &&...  args 
)
inline
Deprecated:
Use assign overload instead

Definition at line 1428 of file types.hpp.

◆ setArrayCopy() [2/2]

template<typename InputIt , typename... Args>
void opcua::Variant::setArrayCopy ( InputIt  first,
InputIt  last,
Args &&...  args 
)
inline
Deprecated:
Use assign overload instead

Definition at line 1435 of file types.hpp.

◆ empty()

bool opcua::Variant::empty ( ) const
inlinenoexcept

Check if the variant is empty.

Definition at line 1445 of file types.hpp.

Referenced by isArray(), isEmpty(), and isScalar().

◆ isEmpty()

bool opcua::Variant::isEmpty ( ) const
inlinenoexcept
Deprecated:
Use empty() instead

Definition at line 1451 of file types.hpp.

◆ isScalar()

bool opcua::Variant::isScalar ( ) const
inlinenoexcept

Check if the variant is a scalar.

Examples
custom_datatypes/client_custom_datatypes.cpp.

Definition at line 1456 of file types.hpp.

Referenced by isArray().

◆ isArray()

bool opcua::Variant::isArray ( ) const
inlinenoexcept

Check if the variant is an array.

Examples
custom_datatypes/client_custom_datatypes.cpp.

Definition at line 1464 of file types.hpp.

◆ isType() [1/4]

bool opcua::Variant::isType ( const UA_DataType type) const
inlinenoexcept

Check if the variant type is equal to the provided data type.

Examples
custom_datatypes/client_custom_datatypes.cpp.

Definition at line 1469 of file types.hpp.

◆ isType() [2/4]

bool opcua::Variant::isType ( const UA_DataType type) const
inlinenoexcept

Check if the variant type is equal to the provided data type.

Definition at line 1476 of file types.hpp.

◆ isType() [3/4]

bool opcua::Variant::isType ( const NodeId id) const
inlinenoexcept

Check if the variant type is equal to the provided data type node id.

Definition at line 1481 of file types.hpp.

◆ isType() [4/4]

template<typename T >
bool opcua::Variant::isType ( ) const
inlinenoexcept

Check if the variant type is equal to the provided template type.

Definition at line 1487 of file types.hpp.

Referenced by isType(), and isType().

◆ type()

const UA_DataType * opcua::Variant::type ( ) const
inlinenoexcept

Get data type.

Definition at line 1492 of file types.hpp.

Referenced by assign(), assign(), assign(), getDataType(), isType(), isType(), isType(), Variant(), Variant(), and Variant().

◆ getDataType()

const UA_DataType * opcua::Variant::getDataType ( ) const
inlinenoexcept
Deprecated:
Use type() instead

Definition at line 1498 of file types.hpp.

◆ arrayLength()

size_t opcua::Variant::arrayLength ( ) const
inlinenoexcept

Get array length or 0 if variant is not an array.

Examples
typeconversion.cpp.

Definition at line 1503 of file types.hpp.

Referenced by array(), array(), getArrayLength(), and isScalar().

◆ getArrayLength()

size_t opcua::Variant::getArrayLength ( ) const
inlinenoexcept
Deprecated:
Use arrayLength() instead

Definition at line 1509 of file types.hpp.

◆ arrayDimensions()

Span< const uint32_t > opcua::Variant::arrayDimensions ( ) const
inlinenoexcept

Get array dimensions.

Definition at line 1514 of file types.hpp.

Referenced by getArrayDimensions().

◆ getArrayDimensions()

Span< const uint32_t > opcua::Variant::getArrayDimensions ( ) const
inlinenoexcept
Deprecated:
Use arrayDimensions() instead

Definition at line 1520 of file types.hpp.

◆ data() [1/2]

void * opcua::Variant::data ( )
inlinenoexcept

Get pointer to the underlying data.

Check the properties and data type before casting it to the actual type. Use the methods isScalar, isArray, isType / type.

Examples
custom_datatypes/client_custom_datatypes.cpp.

Definition at line 1533 of file types.hpp.

Referenced by array(), array(), and isScalar().

◆ data() [2/2]

const void * opcua::Variant::data ( ) const
inlinenoexcept

Get pointer to the underlying data.

Check the properties and data type before casting it to the actual type. Use the methods isScalar, isArray, isType / type.

Definition at line 1538 of file types.hpp.

◆ scalar() [1/4]

template<typename T >
T & opcua::Variant::scalar ( ) &
inline

Get reference to scalar value with given template type (only native or wrapper types).

Exceptions
BadVariantAccessIf the variant is not a scalar or not of type `T`.
Examples
custom_datatypes/client_custom_datatypes.cpp, method/client_method_async.cpp, server_valuecallback.cpp, and typeconversion.cpp.

Definition at line 1545 of file types.hpp.

◆ scalar() [2/4]

template<typename T >
const T & opcua::Variant::scalar ( ) const &
inline

Get reference to scalar value with given template type (only native or wrapper types).

Exceptions
BadVariantAccessIf the variant is not a scalar or not of type `T`.

Definition at line 1554 of file types.hpp.

◆ scalar() [3/4]

template<typename T >
T && opcua::Variant::scalar ( ) &&
inline

Get reference to scalar value with given template type (only native or wrapper types).

Exceptions
BadVariantAccessIf the variant is not a scalar or not of type `T`.

Definition at line 1563 of file types.hpp.

◆ scalar() [4/4]

template<typename T >
const T && opcua::Variant::scalar ( ) const &&
inline

Get reference to scalar value with given template type (only native or wrapper types).

Exceptions
BadVariantAccessIf the variant is not a scalar or not of type `T`.

Definition at line 1569 of file types.hpp.

◆ getScalar() [1/2]

template<typename T >
T & opcua::Variant::getScalar ( )
inline
Deprecated:
Use scalar() instead

Definition at line 1576 of file types.hpp.

◆ getScalar() [2/2]

template<typename T >
const T & opcua::Variant::getScalar ( ) const
inline
Deprecated:
Use scalar() instead

Definition at line 1583 of file types.hpp.

◆ getScalarCopy()

template<typename T >
T opcua::Variant::getScalarCopy ( ) const
inline
Deprecated:
Use to<T>() instead

Definition at line 1590 of file types.hpp.

◆ array() [1/2]

template<typename T >
Span< T > opcua::Variant::array ( )
inline

Get reference to array with given template type (only native or wrapper types).

Exceptions
BadVariantAccessIf the variant is not an array or not of type `T`.
Examples
custom_datatypes/client_custom_datatypes.cpp.

Definition at line 1597 of file types.hpp.

Referenced by fromArray(), setArray(), and setArrayCopy().

◆ array() [2/2]

template<typename T >
Span< const T > opcua::Variant::array ( ) const
inline

Get reference to array with given template type (only native or wrapper types).

Exceptions
BadVariantAccessIf the variant is not an array or not of type `T`.

Definition at line 1607 of file types.hpp.

◆ getArray() [1/2]

template<typename T >
Span< T > opcua::Variant::getArray ( )
inline
Deprecated:
Use array() instead

Definition at line 1617 of file types.hpp.

◆ getArray() [2/2]

template<typename T >
Span< const T > opcua::Variant::getArray ( ) const
inline
Deprecated:
Use array() instead

Definition at line 1624 of file types.hpp.

◆ getArrayCopy()

template<typename T >
std::vector< T > opcua::Variant::getArrayCopy ( ) const
inline
Deprecated:
Use to<std::vector<T>>() instead

Definition at line 1631 of file types.hpp.

◆ to()

template<typename T >
T opcua::Variant::to ( ) const
inline

Converts the variant to the specified type T with automatic conversion if required.

Determines the type category (scalar or array) based on the characteristics of T using type category detection. If T is a container, it must be constructible from an iterator pair.

// Scalar
const auto value = var.to<int>();
// Array
std::array<std::string, 3> array{"One", "Two", "Three"};
const auto vec = var.to<std::vector<std::string>>();
const auto lst = var.to<std::list<opcua::String>>();
Exceptions
BadVariantAccessIf the variant is not convertible to `T`.
Examples
server_datasource.cpp, and typeconversion.cpp.

Definition at line 1659 of file types.hpp.

◆ TypeWrapper() [1/5]

constexpr opcua::TypeWrapper< T, Index >::TypeWrapper ( )
constexprdefaultnoexcept

◆ TypeWrapper() [2/5]

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

Constructor with native object (deep copy).

Definition at line 31 of file typewrapper.hpp.

◆ TypeWrapper() [3/5]

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

Constructor with native object (move rvalue).

Definition at line 35 of file typewrapper.hpp.

◆ TypeWrapper() [4/5]

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

Copy constructor (deep copy).

Definition at line 43 of file typewrapper.hpp.

◆ TypeWrapper() [5/5]

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

Move constructor.

Definition at line 47 of file typewrapper.hpp.