PLCnext API Documentation 25.0.2.69
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
Arp::Base::Acf::Commons::ComponentBase Class Reference

Use this class as base class of all Acf components. More...

#include <ComponentBase.hpp>

Inheritance diagram for Arp::Base::Acf::Commons::ComponentBase:
Inheritance graph

Public Member Functions

 ComponentBase (const ComponentBase &arg)=delete
 
 ComponentBase (ComponentBase &&arg) noexcept
 The default move constructor. More...
 
ComponentBaseoperator= (const ComponentBase &arg)=delete
 
ComponentBaseoperator= (ComponentBase &&arg) noexcept
 The default move-assignment operator. More...
 
 ~ComponentBase (void) override
 The default destructor.
 
ApplicationGetApplication (void) const final
 Gets the application instance of the actual process which loaded this component. More...
 
ILibraryGetLibrary (void) const final
 Gets the library instance of this component. More...
 
String GetFullName (void) const final
 Gets the full qualified name of this component More...
 
ComponentCategory GetComponentCategory (void) const final
 Gets the ComponentCategory of this component. More...
 
uint32 GetStartOrder (void) const final
 Gets the start order of this component. More...
 
bool IsRequired (void) const override
 Determines if this component is required. More...
 
String GetComponentInfoItem (ComponentInfoKind kind) const override
 Gets additional information about the component More...
 
void Initialize (void) override
 Initializes this component: creates singletons, makes any registrations, creates any resources not depending on settings or configuration. More...
 
void LoadSettings (const String &settingsPath) override
 Loads components firmware settings. More...
 
void SetupSettings (void) override
 Sets up components settings which were loaded in LoadSettings. More...
 
void SubscribeServices (void) override
 Subscribes services required by this component. More...
 
void PublishServices (void) override
 Publishes components services. More...
 
void LoadConfig (void) override
 Loads components project configuration. More...
 
void SetupConfig (void) override
 Sets up components configuration which was loaded in LoadConfig. More...
 
void ResetConfig (void) override
 Resets components project configuration. More...
 
void Dispose (void) override
 Disposes this component. More...
 
void PowerDown (void) override
 This operation is called on a power breakdown event and executes component specific actions when power get lost. More...
 
Impl & GetImpl (void)
 For internal use only. More...
 
const Impl & GetImpl (void) const
 
- Public Member Functions inherited from Arp::Base::Acf::Commons::IComponent
 IComponent (IComponent &&arg) noexcept=default
 The move constructor. More...
 
 IComponent (const IComponent &arg)=delete
 The copy constructor is deleted. More...
 
IComponentoperator= (IComponent &&arg) noexcept=default
 The move assignment operator. More...
 
IComponentoperator= (const IComponent &arg)=delete
 The copy assignment operator is deleted. More...
 
virtual ~IComponent (void)=default
 The virtual default destructor.
 
virtual ApplicationGetApplication (void) const =0
 Gets the application instance of the actual process which loaded this component. More...
 
virtual ILibraryGetLibrary (void) const =0
 Gets the library instance of this component. More...
 
virtual String GetFullName (void) const =0
 Gets the full qualified name of this component More...
 
virtual ComponentCategory GetComponentCategory (void) const =0
 Gets the ComponentCategory of this component. More...
 
virtual uint32 GetStartOrder (void) const =0
 Gets the start order of this component. More...
 
virtual bool IsRequired (void) const =0
 Determines if this component is required. More...
 
virtual String GetComponentInfoItem (ComponentInfoKind kind) const =0
 Gets additional information about the component More...
 
virtual void Initialize (void)=0
 Initializes this component: creates singletons, makes any registrations, creates any resources not depending on settings or configuration. More...
 
virtual void SubscribeServices (void)=0
 Subscribes services required by this component. More...
 
virtual void LoadSettings (const String &settingsPath)=0
 Loads components firmware settings. More...
 
virtual void SetupSettings (void)=0
 Sets up components settings which were loaded in LoadSettings. More...
 
virtual void PublishServices (void)=0
 Publishes components services. More...
 
virtual void LoadConfig (void)=0
 Loads components project configuration. More...
 
virtual void SetupConfig (void)=0
 Sets up components configuration which was loaded in LoadConfig. More...
 
virtual void ResetConfig (void)=0
 Resets components project configuration. More...
 
virtual void Dispose (void)=0
 Disposes this component. More...
 
virtual void PowerDown (void)=0
 This operation is called on a power breakdown event and executes component specific actions when power get lost. More...
 

Static Public Member Functions

static uint32 GetDefaultStartOrder (void)
 Gets the default start order of a component which is DomainsStartOrder::Custom. More...
 

Protected Member Functions

 ComponentBase (ILibrary &library, const String &fullName, ComponentCategory category, uint32 startOrder)
 Constructs an ComponentBase instance. More...
 
- Protected Member Functions inherited from Arp::Base::Acf::Commons::IComponent
 IComponent (void)=default
 The default constructor.
 

Additional Inherited Members

- Public Types inherited from Arp::Base::Acf::Commons::IComponent
using Ptr = std::shared_ptr< IComponent >
 The pointer type of this interface.
 

Detailed Description

Use this class as base class of all Acf components.

This class provides some basic component functionality and implements all operations of the IComponent interface at least with an empty implementation.

Constructor & Destructor Documentation

◆ ComponentBase() [1/2]

Arp::Base::Acf::Commons::ComponentBase::ComponentBase ( ILibrary library,
const String fullName,
ComponentCategory  category,
uint32  startOrder 
)
protected

Constructs an ComponentBase instance.

Parameters
libraryThe library instance of the project.
fullNameThe full qualified name of the component.
categoryThe category of the component.
startOrderThe system start order of the component,
isSingletonDetermines if this component is a singleton component, i.e. it shall be instantiated just once.

◆ ComponentBase() [2/2]

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

The default move constructor.

Parameters
argThe argument to move.

Member Function Documentation

◆ Dispose()

void Arp::System::Acf::ComponentBase::Dispose ( void  )
overridevirtual

Disposes this component.

Implements Arp::Base::Acf::Commons::IComponent.

Reimplemented in Arp::Io::Commons::IoComponentBase.

◆ GetApplication()

Application & Arp::Base::Acf::Commons::ComponentBase::GetApplication ( void  ) const
finalvirtual

Gets the application instance of the actual process which loaded this component.

Implements Arp::Base::Acf::Commons::IComponent.

◆ GetComponentCategory()

ComponentCategory Arp::Base::Acf::Commons::ComponentBase::GetComponentCategory ( void  ) const
finalvirtual

Gets the ComponentCategory of this component.

Implements Arp::Base::Acf::Commons::IComponent.

◆ GetComponentInfoItem()

String Arp::Base::Acf::Commons::ComponentBase::GetComponentInfoItem ( ComponentInfoKind  kind) const
overridevirtual

Gets additional information about the component

Implements Arp::Base::Acf::Commons::IComponent.

◆ GetDefaultStartOrder()

uint32 Arp::System::Acf::ComponentBase::GetDefaultStartOrder ( void  )
static

Gets the default start order of a component which is DomainsStartOrder::Custom.

Returns
The default start order.

◆ GetFullName()

String Arp::Base::Acf::Commons::ComponentBase::GetFullName ( void  ) const
finalvirtual

Gets the full qualified name of this component

Implements Arp::Base::Acf::Commons::IComponent.

◆ GetImpl()

const ComponentBase::Impl & Arp::Base::Acf::Commons::ComponentBase::GetImpl ( void  )

For internal use only.

Returns
The implementation instance of this instance.

◆ GetLibrary()

ILibrary & Arp::Base::Acf::Commons::ComponentBase::GetLibrary ( void  ) const
finalvirtual

Gets the library instance of this component.

Implements Arp::Base::Acf::Commons::IComponent.

◆ GetStartOrder()

uint32 Arp::Base::Acf::Commons::ComponentBase::GetStartOrder ( void  ) const
finalvirtual

Gets the start order of this component.

Implements Arp::Base::Acf::Commons::IComponent.

◆ Initialize()

void Arp::System::Acf::ComponentBase::Initialize ( void  )
overridevirtual

Initializes this component: creates singletons, makes any registrations, creates any resources not depending on settings or configuration.

Implements Arp::Base::Acf::Commons::IComponent.

Reimplemented in Arp::Io::Commons::IoComponentBase.

◆ IsRequired()

bool Arp::Base::Acf::Commons::ComponentBase::IsRequired ( void  ) const
overridevirtual

Determines if this component is required.

Implements Arp::Base::Acf::Commons::IComponent.

◆ LoadConfig()

void Arp::System::Acf::ComponentBase::LoadConfig ( void  )
overridevirtual

Loads components project configuration.

Implements Arp::Base::Acf::Commons::IComponent.

Reimplemented in Arp::Io::Commons::IoComponentBase.

◆ LoadSettings()

void Arp::System::Acf::ComponentBase::LoadSettings ( const String settingsPath)
overridevirtual

Loads components firmware settings.

Implements Arp::Base::Acf::Commons::IComponent.

Reimplemented in Arp::Io::Commons::IoComponentBase.

◆ operator=()

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

The default move-assignment operator.

Parameters
argThe argument to move.
Returns
This instance.

◆ PowerDown()

void Arp::System::Acf::ComponentBase::PowerDown ( void  )
overridevirtual

This operation is called on a power breakdown event and executes component specific actions when power get lost.

Implements Arp::Base::Acf::Commons::IComponent.

Reimplemented in Arp::Io::Commons::IoComponentBase.

◆ PublishServices()

void Arp::System::Acf::ComponentBase::PublishServices ( void  )
overridevirtual

Publishes components services.

Implements Arp::Base::Acf::Commons::IComponent.

Reimplemented in Arp::Io::Commons::IoComponentBase.

◆ ResetConfig()

void Arp::System::Acf::ComponentBase::ResetConfig ( void  )
overridevirtual

Resets components project configuration.

Implements Arp::Base::Acf::Commons::IComponent.

Reimplemented in Arp::Io::Commons::IoComponentBase.

◆ SetupConfig()

void Arp::System::Acf::ComponentBase::SetupConfig ( void  )
overridevirtual

Sets up components configuration which was loaded in LoadConfig.

Implements Arp::Base::Acf::Commons::IComponent.

Reimplemented in Arp::Io::Commons::IoComponentBase.

◆ SetupSettings()

void Arp::System::Acf::ComponentBase::SetupSettings ( void  )
overridevirtual

Sets up components settings which were loaded in LoadSettings.

Implements Arp::Base::Acf::Commons::IComponent.

Reimplemented in Arp::Io::Commons::IoComponentBase.

◆ SubscribeServices()

void Arp::System::Acf::ComponentBase::SubscribeServices ( void  )
overridevirtual

Subscribes services required by this component.

Implements Arp::Base::Acf::Commons::IComponent.

Reimplemented in Arp::Io::Commons::IoComponentBase.


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