open62541pp 0.16.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. Usually, the native plugin carries a void* context pointer which will refer back to the plugin adapter. Either move the adapter ownership to the plugin with ownsAdapter = true or 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 (bool ownsAdapter)=0
 

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 ( bool ownsAdapter)
pure virtual