open62541pp 0.16.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 32 of file wrapper.hpp.

Public Types

using NativeType = T
 

Public Member Functions

constexpr Wrapper ()=default
 
constexpr Wrapper (const T &native)
 
constexpr Wrapper (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
 

Protected Member Functions

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

Member Typedef Documentation

◆ NativeType

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

Definition at line 34 of file wrapper.hpp.

Constructor & Destructor Documentation

◆ Wrapper() [1/3]

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

◆ Wrapper() [2/3]

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

Definition at line 38 of file wrapper.hpp.

◆ Wrapper() [3/3]

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

Definition at line 41 of file wrapper.hpp.

Member Function Documentation

◆ operator T&()

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

Implicit conversion to native object.

Definition at line 45 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 50 of file wrapper.hpp.

◆ operator->() [1/2]

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

Member access to native object.

Definition at line 55 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 60 of file wrapper.hpp.

◆ handle() [1/2]

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

Return pointer to native object.

Definition at line 65 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 70 of file wrapper.hpp.

◆ native() [1/2]

◆ native() [2/2]

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

Definition at line 79 of file wrapper.hpp.