23template <
typename T, TypeIndex Index>
48 :
Wrapper<T>(std::exchange(other.native(), {})) {}
61 if (&this->
native() != &native) {
72 this->
native() = std::exchange(other.native(), {});
92 constexpr void clear() noexcept {
102struct IsTypeWrapper {
104 template <
typename U, TypeIndex Index>
105 static std::true_type check(
const TypeWrapper<U, Index>&);
107 static std::false_type check(...);
109 using type =
decltype(check(std::declval<T&>()));
110 static constexpr bool value = type::value;
114constexpr bool isTypeWrapper = IsTypeWrapper<T>::value;
Template base class to wrap UA_* type objects that require manual memory management.
constexpr TypeWrapper & operator=(TypeWrapper &&other) noexcept
Move assignment.
constexpr TypeWrapper(T &&native) noexcept
Constructor with native object (move rvalue).
constexpr TypeWrapper(TypeWrapper &&other) noexcept
Move constructor.
constexpr TypeWrapper & operator=(T &&native) noexcept
Move assignment with native object.
constexpr TypeWrapper & operator=(const TypeWrapper &other)
Copy assignment (deep copy).
constexpr TypeWrapper() noexcept=default
constexpr TypeWrapper & operator=(const T &native)
Copy assignment with native object (deep copy).
constexpr void clear() noexcept
static constexpr TypeIndex typeIndex()
Get type as type index of the UA_TYPES array.
constexpr TypeWrapper(const TypeWrapper &other)
Copy constructor (deep copy).
Template base class to wrap native objects.
constexpr const T & native() const noexcept
constexpr Wrapper() noexcept=default
uint16_t TypeIndex
Type index of the UA_TYPES array.
static const UA_DataType & getDataType() noexcept
const UA_DataType UA_TYPES[191]