PLCnext API Documentation 23.6.0.37
Public Member Functions | Protected Attributes | List of all members
Arp::System::Acf::LibraryBase Class Reference

Any Acf Library shall derive from this base class. More...

#include <LibraryBase.hpp>

Inheritance diagram for Arp::System::Acf::LibraryBase:
Inheritance graph

Public Member Functions

 LibraryBase (AppDomain &appDomain, const Version &buildVersion)
 Constructs an isntance of class LibraryBase. More...
 
virtual ~LibraryBase (void)
 The default destructor.
 
IComponentFactoryGetComponentFactory (void) override
 Gets the component factory of this library to create instances of its provided components. More...
 
const VersionGetBuildVersion (void) const override
 Gets the build version of the SDK/Firmware which was used to build this library. More...
 
template<class T >
void RegisterComponentType (void)
 This template operation registers the as template parameter passed component type, using the C++ typename and the static Create</> of the component type, which creates an instance of the component type. More...
 
template<class T >
void RegisterComponentType (const String &typeName)
 This template operation registers the as template parameter passed component type, using the C++ typename and the static Create</> of the component type, which creates an instance of the component type. More...
 
- Public Member Functions inherited from Arp::System::Acf::ILibrary
 ILibrary (void)=default
 The default constructor.
 
virtual ~ILibrary (void)=default
 The default destructor.
 
virtual IComponentFactoryGetComponentFactory (void)=0
 Gets the component factory of this library to create instances of its provided components. More...
 
virtual const VersionGetBuildVersion (void) const =0
 Gets the SDK version of the SDK used to build the shared library. More...
 

Protected Attributes

ComponentFactory componentFactory
 This field is used to register library specific component factory methods.
 

Additional Inherited Members

- Public Types inherited from Arp::System::Acf::ILibrary
typedef ILibraryPtr
 The pointer type of this interface.
 
typedef ILibrary &(* MainEntry) (AppDomain &appDomain)
 This is the prototype of the main entry point of any library which shall be loaded dynamically by the Acf. More...
 
- Protected Types inherited from Arp::System::Acf::ILibrary
typedef void(* Main) (AppDomain &appDomain)
 This is the prototype of the (static) entry point or auxiliary operation of any library class. More...
 

Detailed Description

Any Acf Library shall derive from this base class.

Any dynamic shared library which might be loaded by the Acf infrastructure should derive from this base class for easily provide the required functionality. /remarks>

Constructor & Destructor Documentation

◆ LibraryBase()

Arp::System::Acf::LibraryBase::LibraryBase ( AppDomain appDomain,
const Version buildVersion 
)

Constructs an isntance of class LibraryBase.

Parameters
appDomainThe actual AppDomain of the application loading this library.
buildVersionThe current build version, this should always be set to ARP_VERSION_CURRENT.

Member Function Documentation

◆ GetBuildVersion()

const Version & Arp::System::Acf::LibraryBase::GetBuildVersion ( void  ) const
inlineoverridevirtual

Gets the build version of the SDK/Firmware which was used to build this library.

Returns
The build version of the SDK/Firmware which was used to build this library.

Implements Arp::System::Acf::ILibrary.

◆ GetComponentFactory()

IComponentFactory & Arp::System::Acf::LibraryBase::GetComponentFactory ( void  )
overridevirtual

Gets the component factory of this library to create instances of its provided components.

Any dynamic shared library has a component factory to create component instances dynmically configured by Acf configuration.

Implements Arp::System::Acf::ILibrary.

◆ RegisterComponentType() [1/2]

template<class T >
void Arp::System::Acf::LibraryBase::RegisterComponentType ( const String typeName)
inline

This template operation registers the as template parameter passed component type, using the C++ typename and the static Create</> of the component type, which creates an instance of the component type.

Template Parameters
TThe component type to register for creation.
Parameters
typeNameThe custom typename of the component used in .acf.config files to create an instance of this component.

◆ RegisterComponentType() [2/2]

template<class T >
void Arp::System::Acf::LibraryBase::RegisterComponentType ( void  )
inline

This template operation registers the as template parameter passed component type, using the C++ typename and the static Create</> of the component type, which creates an instance of the component type.

Template Parameters
TThe component type to register for creation.

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