PLCnext API Documentation 25.0.2.69
Public Types | Public Member Functions | List of all members
Arp::Base::Acf::Commons::IComponentFactory Class Referenceabstract

This interface is used by the Acf to create components dynamically through configuration (.acf.config) More...

#include <IComponentFactory.hpp>

Public Types

using FactoryMethod = IComponent::Ptr(*)(ILibrary &library, const String &componentName)
 The prototype of the component factory method, which might be registered to create components.
 
using FactoryMethodCompat = IComponent::Ptr(*)(Application &application, const String &componentName)
 The deprecated prototype of the component factory method, which might be registered to create components.
 

Public Member Functions

 IComponentFactory (void)=default
 The default constructor.
 
 IComponentFactory (IComponentFactory &&arg) noexcept=default
 The move constructor. More...
 
 IComponentFactory (const IComponentFactory &arg)=delete
 The copy constructor is deleted. More...
 
IComponentFactoryoperator= (IComponentFactory &&arg) noexcept=default
 The move assignment operator. More...
 
IComponentFactoryoperator= (const IComponentFactory &arg)=delete
 The copy assignment operator is deleted. More...
 
virtual ~IComponentFactory (void)=default
 The virtual default destructor.
 
virtual bool HasComponentType (const String &typeName)=0
 Determines if this factory provides components of the given type-name. More...
 
virtual IComponent::Ptr CreateComponent (const String &typeName, const String &componentName)=0
 Creates a component of the given type-name. More...
 

Detailed Description

This interface is used by the Acf to create components dynamically through configuration (.acf.config)

This interface shall implemented by all component factories provided by Acf libraries.

Constructor & Destructor Documentation

◆ IComponentFactory() [1/2]

Arp::Base::Acf::Commons::IComponentFactory::IComponentFactory ( IComponentFactory &&  arg)
defaultnoexcept

The move constructor.

Parameters
argThe argument to move.

◆ IComponentFactory() [2/2]

Arp::Base::Acf::Commons::IComponentFactory::IComponentFactory ( const IComponentFactory arg)
delete

The copy constructor is deleted.

Parameters
argThe argument to copy.

Member Function Documentation

◆ CreateComponent()

virtual IComponent::Ptr Arp::Base::Acf::Commons::IComponentFactory::CreateComponent ( const String typeName,
const String componentName 
)
pure virtual

Creates a component of the given type-name.

Parameters
typeNameThe C++ type name of the component to search for.
componentNameThe name of the new created component.
Returns
The new component instance, if the specified type could be provided, otherwise nullptr.

◆ HasComponentType()

virtual bool Arp::Base::Acf::Commons::IComponentFactory::HasComponentType ( const String typeName)
pure virtual

Determines if this factory provides components of the given type-name.

Parameters
typeNameThe C++ type name of the component to search for.
Returns
true if the specified type could be provided, otherwise false.

◆ operator=() [1/2]

IComponentFactory & Arp::Base::Acf::Commons::IComponentFactory::operator= ( const IComponentFactory arg)
delete

The copy assignment operator is deleted.

Parameters
argThe argument to copy.
Returns
This instance.

◆ operator=() [2/2]

IComponentFactory & Arp::Base::Acf::Commons::IComponentFactory::operator= ( IComponentFactory &&  arg)
defaultnoexcept

The move assignment operator.

Parameters
argThe argument to move.
Returns
This instance.

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