ALib C++ Library
Library Version: 2510 R0
Documentation generated by doxygen
Loading...
Searching...
No Matches
alib::lang::Plugin< TPlugin, TPriorities > Class Template Reference

Description:

template<typename TPlugin, typename TPriorities>
class alib::lang::Plugin< TPlugin, TPriorities >

This class usually is used as a base class for types that need to manage simple plug-ins. Within ALib itself, for example classes Configuration and Compiler inherit from this class.

Plug-ins are organized with a prioritization. This means, that plug-ins which are inserted with a higher priority are 'asked' first, and those with a lower value become 'asked' only if higher prioritized plug-ins did not answer.
However, a derived class can deviate from this behavior. Using the typical ALib class design, all internal fields are protected, hence freely accessible by derived classes.

Template Parameters
TPluginThe plug-in type that this class manages. This type is publicly exposed as PluginType This type is publicly exposed as PrioritiesType.

Definition at line 26 of file plugins.inl.

Public Type Index:

using PluginType = TPlugin
 This exposes the template parameter TPlugin to the outer world.
 
using PrioritiesType = TPriorities
 This exposes the template parameter pTPlugin to the outer world.
 

Public Method Index:

PrioritiesType GetPriority () const
 

Protected Field Index:

PrioritiesType priority
 The priority of this plug-in.
 

Protected Method Index:

 Plugin (PrioritiesType pPriority)
 

Type Definition Details:

◆ PluginType

template<typename TPlugin, typename TPriorities>
using alib::lang::Plugin< TPlugin, TPriorities >::PluginType = TPlugin

This exposes the template parameter TPlugin to the outer world.

Definition at line 30 of file plugins.inl.

◆ PrioritiesType

template<typename TPlugin, typename TPriorities>
using alib::lang::Plugin< TPlugin, TPriorities >::PrioritiesType = TPriorities

This exposes the template parameter pTPlugin to the outer world.

Definition at line 33 of file plugins.inl.

Field Details:

◆ priority

template<typename TPlugin, typename TPriorities>
PrioritiesType alib::lang::Plugin< TPlugin, TPriorities >::priority
protected

The priority of this plug-in.

Definition at line 37 of file plugins.inl.

Constructor(s) / Destructor Details:

◆ Plugin()

template<typename TPlugin, typename TPriorities>
alib::lang::Plugin< TPlugin, TPriorities >::Plugin ( PrioritiesType pPriority)
inlineprotected

Constructor which is protected, as this is a bace class.

Parameters
pPriorityThe priority that this plug-in uses.

Definition at line 41 of file plugins.inl.

Method Details:

◆ GetPriority()

template<typename TPlugin, typename TPriorities>
PrioritiesType alib::lang::Plugin< TPlugin, TPriorities >::GetPriority ( ) const
inline

Returns the priority of this plug-in which is set during construction.

Returns
The priority of this plugin.

Definition at line 47 of file plugins.inl.


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