open62541pp 0.17.0
C++ wrapper of open62541
Loading...
Searching...
No Matches
opcua::Wrapper< T > Class Template Reference

#include <wrapper.hpp>

Inheritance diagram for opcua::Wrapper< T >:
[legend]

Detailed Description

template<typename T>
class opcua::Wrapper< T >

Template base class to wrap native objects.

Definition at line 33 of file wrapper.hpp.

Public Types

using NativeType = T
 

Public Member Functions

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
 

Protected Member Functions

constexpr const T & native () const noexcept
 
constexpr T & native () noexcept
 

Related Symbols

(Note that these are not member symbols.)

template<typename WrapperType , typename NativeType = typename WrapperType::NativeType>
constexpr WrapperType * asWrapper (NativeType *native) noexcept
 
template<typename WrapperType , typename NativeType = typename WrapperType::NativeType>
constexpr const WrapperType * asWrapper (const NativeType *native) noexcept
 
template<typename WrapperType , typename NativeType = typename WrapperType::NativeType>
constexpr WrapperType & asWrapper (NativeType &native) noexcept
 
template<typename WrapperType , typename NativeType = typename WrapperType::NativeType>
constexpr const WrapperType & asWrapper (const NativeType &native) noexcept
 
template<typename WrapperType , typename NativeType = typename WrapperType::NativeType>
constexpr NativeTypeasNative (WrapperType *wrapper) noexcept
 
template<typename WrapperType , typename NativeType = typename WrapperType::NativeType>
constexpr const NativeTypeasNative (const WrapperType *wrapper) noexcept
 
template<typename WrapperType , typename NativeType = typename WrapperType::NativeType>
constexpr NativeTypeasNative (WrapperType &wrapper) noexcept
 
template<typename WrapperType , typename NativeType = typename WrapperType::NativeType>
constexpr const NativeTypeasNative (const WrapperType &wrapper) noexcept
 

Member Typedef Documentation

◆ NativeType

template<typename T >
using opcua::Wrapper< T >::NativeType = T

Definition at line 37 of file wrapper.hpp.

Constructor & Destructor Documentation

◆ Wrapper() [1/3]

template<typename T >
opcua::Wrapper< T >::Wrapper ( )
constexprdefaultnoexcept

◆ Wrapper() [2/3]

template<typename T >
opcua::Wrapper< T >::Wrapper ( const T & native)
inlineexplicitconstexprnoexcept

Copy constructor with native object.

Definition at line 42 of file wrapper.hpp.

◆ Wrapper() [3/3]

template<typename T >
opcua::Wrapper< T >::Wrapper ( T && native)
inlineexplicitconstexprnoexcept

Move constructor with native object.

Definition at line 46 of file wrapper.hpp.

Member Function Documentation

◆ operator=() [1/2]

template<typename T >
Wrapper & opcua::Wrapper< T >::operator= ( const T & native)
inlineconstexprnoexcept

Copy assignment with native object.

Definition at line 50 of file wrapper.hpp.

◆ operator=() [2/2]

template<typename T >
Wrapper & opcua::Wrapper< T >::operator= ( T && native)
inlineconstexprnoexcept

Move assignment with native object.

Definition at line 56 of file wrapper.hpp.

◆ operator T&()

template<typename T >
opcua::Wrapper< T >::operator T& ( )
inlineconstexprnoexcept

Implicit conversion to native object.

Definition at line 62 of file wrapper.hpp.

◆ operator const T &()

template<typename T >
opcua::Wrapper< T >::operator const T & ( ) const
inlineconstexprnoexcept

Implicit conversion to native object.

Definition at line 67 of file wrapper.hpp.

◆ operator->() [1/2]

template<typename T >
T * opcua::Wrapper< T >::operator-> ( )
inlineconstexprnoexcept

Member access to native object.

Definition at line 72 of file wrapper.hpp.

◆ operator->() [2/2]

template<typename T >
const T * opcua::Wrapper< T >::operator-> ( ) const
inlineconstexprnoexcept

Member access to native object.

Definition at line 77 of file wrapper.hpp.

◆ handle() [1/2]

template<typename T >
T * opcua::Wrapper< T >::handle ( )
inlineconstexprnoexcept

Return pointer to native object.

Definition at line 82 of file wrapper.hpp.

◆ handle() [2/2]

template<typename T >
const T * opcua::Wrapper< T >::handle ( ) const
inlineconstexprnoexcept

Return pointer to native object.

Definition at line 87 of file wrapper.hpp.

◆ swap() [1/2]

template<typename T >
void opcua::Wrapper< T >::swap ( Wrapper< T > & other)
inlineconstexprnoexcept

Swap with wrapper object.

Definition at line 92 of file wrapper.hpp.

◆ swap() [2/2]

template<typename T >
void opcua::Wrapper< T >::swap ( T & native)
inlineconstexprnoexcept

Swap with native object.

Definition at line 97 of file wrapper.hpp.

◆ native() [1/2]

◆ native() [2/2]

template<typename T >
T & opcua::Wrapper< T >::native ( )
inlineconstexprprotectednoexcept

Definition at line 106 of file wrapper.hpp.