PLCnext API Documentation  22.9.0.33
Public Member Functions | Protected Member Functions | List of all members
Arp::System::Commons::Extensibility::ModuleLibraryBase< TModuleInterface > Class Template Reference

Base class for a library providing extension modules More...

#include <ModuleLibraryBase.hxx>

Public Member Functions

const ModuleFactory< TModuleInterface > & GetFactory () const
 Returns a const reference to the ModuleFactory More...
 

Protected Member Functions

 ModuleLibraryBase (AppDomain &appDomain)
 Constructs an ModuleLibraryBase instance. More...
 
 ModuleLibraryBase (const ModuleLibraryBase &arg)=default
 Copy constructor. More...
 
 ModuleLibraryBase (ModuleLibraryBase &&arg) noexcept=default
 Move constructor. More...
 
ModuleLibraryBaseoperator= (const ModuleLibraryBase &arg)=default
 Copy-assignment operator. More...
 
ModuleLibraryBaseoperator= (ModuleLibraryBase &&arg) noexcept=default
 Move-assignment operator. More...
 
virtual ~ModuleLibraryBase (void) noexcept=default
 Destructs this instance and frees all resources. More...
 
ModuleFactory< TModuleInterface > & GetFactory ()
 Returns a non-const reference to the ModuleFactory More...
 

Detailed Description

template<typename TModuleInterface>
class Arp::System::Commons::Extensibility::ModuleLibraryBase< TModuleInterface >

Base class for a library providing extension modules

Template Parameters
TModuleInterfaceType of the base class for the modules

This class is used as the starting point for the module infrastructure to create module implementations. Additionally this class sets up the AppDomain for this library. If RSC should be used the constructor of the derived class must intialize the AppDomain for RSC. This class knows nothing of RSC.

The library must provide a function that creates an object of a derived class and returns a reference to that object. The library object is intended to be a singleton and using a static class instance in the called function is preferred.

extern "C" ARP_CXX_SYMBOL_EXPORT const SomeModuleLibraryBase& CreateModuleLibrary(AppDomain& appDomain)
{
static SomeSomeModuleLibrary instance(appDomain);
return instance;
}

Constructor & Destructor Documentation

◆ ModuleLibraryBase() [1/3]

template<typename TModuleInterface >
Arp::System::Commons::Extensibility::ModuleLibraryBase< TModuleInterface >::ModuleLibraryBase ( AppDomain appDomain)
explicitprotected

Constructs an ModuleLibraryBase instance.

◆ ModuleLibraryBase() [2/3]

template<typename TModuleInterface >
Arp::System::Commons::Extensibility::ModuleLibraryBase< TModuleInterface >::ModuleLibraryBase ( const ModuleLibraryBase< TModuleInterface > &  arg)
protecteddefault

Copy constructor.

◆ ModuleLibraryBase() [3/3]

template<typename TModuleInterface >
Arp::System::Commons::Extensibility::ModuleLibraryBase< TModuleInterface >::ModuleLibraryBase ( ModuleLibraryBase< TModuleInterface > &&  arg)
protecteddefaultnoexcept

Move constructor.

◆ ~ModuleLibraryBase()

template<typename TModuleInterface >
virtual Arp::System::Commons::Extensibility::ModuleLibraryBase< TModuleInterface >::~ModuleLibraryBase ( void  )
protectedvirtualdefaultnoexcept

Destructs this instance and frees all resources.

Member Function Documentation

◆ GetFactory() [1/2]

template<typename TModuleInterface >
ModuleFactory< TModuleInterface > & Arp::System::Commons::Extensibility::ModuleLibraryBase< TModuleInterface >::GetFactory
protected

Returns a non-const reference to the ModuleFactory

Use this function to register factory funtions for modules.

◆ GetFactory() [2/2]

template<typename TModuleInterface >
const ModuleFactory< TModuleInterface > & Arp::System::Commons::Extensibility::ModuleLibraryBase< TModuleInterface >::GetFactory

Returns a const reference to the ModuleFactory

Use this function to create modules.

◆ operator=() [1/2]

template<typename TModuleInterface >
ModuleLibraryBase& Arp::System::Commons::Extensibility::ModuleLibraryBase< TModuleInterface >::operator= ( const ModuleLibraryBase< TModuleInterface > &  arg)
protecteddefault

Copy-assignment operator.

◆ operator=() [2/2]

template<typename TModuleInterface >
ModuleLibraryBase& Arp::System::Commons::Extensibility::ModuleLibraryBase< TModuleInterface >::operator= ( ModuleLibraryBase< TModuleInterface > &&  arg)
protecteddefaultnoexcept

Move-assignment operator.


The documentation for this class was generated from the following file: