23template <
typename T, TypeIndex typeIndex>
48 :
Wrapper<T>(std::exchange(other.native(), {})) {}
61 if (&this->
native() != &native) {
72 this->
native() = std::exchange(other.native(), {});
88 static_assert(std::is_nothrow_swappable_v<T>);
89 std::swap(this->
native(), other.native());
94 static_assert(std::is_nothrow_swappable_v<T>);
116 template <
typename U, TypeIndex typeIndex>
122 static constexpr bool value = type::value;
Template base class to wrap UA_* type objects.
constexpr TypeWrapper & operator=(T &&native) noexcept
Move assignment with native object.
constexpr void swap(TypeWrapper &other) noexcept
Swap with wrapper object.
constexpr void clear() noexcept
constexpr TypeWrapper(const TypeWrapper &other)
Copy constructor (deep copy).
static constexpr TypeIndex getTypeIndex()
Get type as type index of the UA_TYPES array.
constexpr TypeWrapper(const T &native)
Constructor with native object (deep copy).
constexpr TypeWrapper()=default
constexpr TypeWrapper & operator=(const T &native)
Copy assignment with native object (deep copy).
constexpr TypeWrapper(TypeWrapper &&other) noexcept
Move constructor.
constexpr void swap(T &native) noexcept
Swap with native object.
constexpr TypeWrapper(T &&native) noexcept
Constructor with native object (move rvalue).
constexpr TypeWrapper & operator=(TypeWrapper &&other) noexcept
Move assignment.
constexpr TypeWrapper & operator=(const TypeWrapper &other)
Copy assignment (deep copy).
Template base class to wrap native objects.
constexpr const T & native() const noexcept
constexpr Wrapper()=default
constexpr T copy(const T &src, const UA_DataType &type) noexcept(isPointerFree< T >)
constexpr bool isTypeWrapper
constexpr void clear(T &native, const UA_DataType &type) noexcept
uint16_t TypeIndex
Type index of the UA_TYPES array.
static const UA_DataType & getDataType() noexcept
static std::true_type check(const TypeWrapper< U, typeIndex > &)
decltype(check(std::declval< T & >())) type
static constexpr bool value
static std::false_type check(...)
const UA_DataType UA_TYPES[191]