open62541pp 0.15.0
C++ wrapper of open62541
Loading...
Searching...
No Matches
opcua::PluginAdapter< T > Class Template Referenceabstract

#include <pluginadapter.hpp>

Detailed Description

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

Base class to implement plugin adapters.

Plugin adapters will provide a different (modern) interface for open62541's native plugins. For example AccessControlBase is the plugin adapter for UA_AccessControl.

The native plugin is created via the PluginAdapter::create function. The PluginAdapter::clear function is used to clear the created plugin after usage. Usually the native plugin carries a void* context pointer which will refer back to the plugin adapter. Make sure that the plugin adapter outlives the native plugin to avoid dangling pointers.

Template Parameters
TType of the native plugin, e.g. UA_AccessControl

Definition at line 19 of file pluginadapter.hpp.

Public Types

using PluginType = T
 

Public Member Functions

 PluginAdapter ()=default
 
virtual ~PluginAdapter ()=default
 
 PluginAdapter (const PluginAdapter &)=default
 
 PluginAdapter (PluginAdapter &&) noexcept=default
 
PluginAdapteroperator= (const PluginAdapter &)=default
 
PluginAdapteroperator= (PluginAdapter &&) noexcept=default
 
virtual T create ()=0
 
virtual void clear (T &plugin) noexcept=0
 
virtual void clear (T *&plugin) noexcept
 

Member Typedef Documentation

◆ PluginType

template<typename T >
using opcua::PluginAdapter< T >::PluginType = T

Definition at line 21 of file pluginadapter.hpp.

Constructor & Destructor Documentation

◆ PluginAdapter() [1/3]

template<typename T >
opcua::PluginAdapter< T >::PluginAdapter ( )
default

◆ ~PluginAdapter()

template<typename T >
virtual opcua::PluginAdapter< T >::~PluginAdapter ( )
virtualdefault

◆ PluginAdapter() [2/3]

template<typename T >
opcua::PluginAdapter< T >::PluginAdapter ( const PluginAdapter< T > & )
default

◆ PluginAdapter() [3/3]

template<typename T >
opcua::PluginAdapter< T >::PluginAdapter ( PluginAdapter< T > && )
defaultnoexcept

Member Function Documentation

◆ operator=() [1/2]

template<typename T >
PluginAdapter & opcua::PluginAdapter< T >::operator= ( const PluginAdapter< T > & )
default

◆ operator=() [2/2]

template<typename T >
PluginAdapter & opcua::PluginAdapter< T >::operator= ( PluginAdapter< T > && )
defaultnoexcept

◆ create()

template<typename T >
virtual T opcua::PluginAdapter< T >::create ( )
pure virtual

◆ clear() [1/2]

template<typename T >
virtual void opcua::PluginAdapter< T >::clear ( T & plugin)
pure virtualnoexcept

◆ clear() [2/2]

template<typename T >
virtual void opcua::PluginAdapter< T >::clear ( T *& plugin)
inlinevirtualnoexcept

Definition at line 35 of file pluginadapter.hpp.