open62541pp 0.17.0
C++ wrapper of open62541
Loading...
Searching...
No Matches
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:1176
    Span< T > array()
    Get reference to array with given template type (only native or wrapper types).
    Definition types.hpp:1580
  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:256
    constexpr const UA_Variant & native() const noexcept
    Definition wrapper.hpp:102
Examples
custom_datatypes/client_custom_datatypes.cpp, server_accesscontrol.cpp, server_datasource.cpp, and typeconversion.cpp.

Definition at line 1176 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< UA_Variant >
constexpr Wrapper () noexcept=default
 
constexpr Wrapper (const UA_Variant &native) noexcept
 
constexpr Wrapper (UA_Variant &&native) noexcept
 
constexpr Wrapperoperator= (const UA_Variant &native) noexcept
 
constexpr Wrapperoperator= (UA_Variant &&native) noexcept
 
constexpr operator UA_Variant & () noexcept
 
constexpr operator const UA_Variant & () const noexcept
 
constexpr UA_Variantoperator-> () noexcept
 
constexpr const UA_Variantoperator-> () const noexcept
 
constexpr UA_Varianthandle () noexcept
 
constexpr const UA_Varianthandle () const noexcept
 
constexpr void swap (Wrapper &other) noexcept
 
constexpr void swap (UA_Variant &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< UA_Variant >
using NativeType
 
- Protected Member Functions inherited from opcua::TypeWrapper< UA_Variant, UA_TYPES_VARIANT >
constexpr void clear () noexcept
 
- Protected Member Functions inherited from opcua::Wrapper< UA_Variant >
constexpr const UA_Variantnative () const noexcept
 
constexpr UA_Variantnative () 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 1189 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 1196 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 1203 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 1210 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 1217 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 1224 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 )
inlinestaticnodiscard
Deprecated
Use new universal Variant constructor instead

Definition at line 1231 of file types.hpp.

Referenced by opcua::DataValue::fromScalar().

◆ fromArray() [1/2]

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

Definition at line 1242 of file types.hpp.

Referenced by opcua::DataValue::fromArray().

◆ fromArray() [2/2]

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

Definition at line 1253 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 1277 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 1294 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 1312 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 1334 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 1349 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 1367 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 1374 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 1382 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 1390 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 1397 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 1404 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 1411 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 1418 of file types.hpp.

◆ empty()

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

Check if the variant is empty.

Definition at line 1428 of file types.hpp.

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

◆ isEmpty()

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

Definition at line 1434 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 1439 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 1447 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 1452 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 1459 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 1464 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 1470 of file types.hpp.

Referenced by isType(), and isType().

◆ type()

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

Get data type.

Definition at line 1475 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 1481 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 1486 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 1492 of file types.hpp.

◆ arrayDimensions()

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

Get array dimensions.

Definition at line 1497 of file types.hpp.

Referenced by getArrayDimensions().

◆ getArrayDimensions()

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

Definition at line 1503 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 1516 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 1521 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
client_subscription.cpp, custom_datatypes/client_custom_datatypes.cpp, server_valuecallback.cpp, and typeconversion.cpp.

Definition at line 1528 of file types.hpp.

Referenced by getScalar(), getScalar(), scalar(), and scalar().

◆ 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 1537 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 1546 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 1552 of file types.hpp.

◆ getScalar() [1/2]

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

Definition at line 1559 of file types.hpp.

◆ getScalar() [2/2]

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

Definition at line 1566 of file types.hpp.

◆ getScalarCopy()

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

Definition at line 1573 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 1580 of file types.hpp.

Referenced by fromArray(), getArray(), getArray(), 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 1590 of file types.hpp.

◆ getArray() [1/2]

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

Definition at line 1600 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 1607 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 1614 of file types.hpp.

◆ to()

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

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 1642 of file types.hpp.

Referenced by getArrayCopy(), and getScalarCopy().

◆ TypeWrapper() [1/5]

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

◆ TypeWrapper() [2/5]

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]

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]

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

Copy constructor (deep copy).

Definition at line 43 of file typewrapper.hpp.

◆ TypeWrapper() [5/5]

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

Move constructor.

Definition at line 47 of file typewrapper.hpp.