ALib C++ Library
Library Version: 2412 R0
Documentation generated by doxygen
Loading...
Searching...
No Matches
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.

Availability
While this class is located in the core namespace alib::lang, it is compilable only in case module ALib Enums is included in the ALib Distribution.
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 47 of file lang/plugins.hpp.

#include <plugins.hpp>

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 PluginType = TPlugin

This exposes the template parameter TPlugin to the outer world.

Definition at line 51 of file lang/plugins.hpp.

◆ PrioritiesType

template<typename TPlugin , typename TPriorities >
using PrioritiesType = TPriorities

This exposes the template parameter pTPlugin to the outer world.

Definition at line 54 of file lang/plugins.hpp.

Field Details:

◆ priority

template<typename TPlugin , typename TPriorities >
PrioritiesType priority
protected

The priority of this plug-in.

Definition at line 58 of file lang/plugins.hpp.

Constructor(s) / Destructor Details:

◆ Plugin()

template<typename TPlugin , typename 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 62 of file lang/plugins.hpp.

Method Details:

◆ GetPriority()

template<typename TPlugin , typename TPriorities >
PrioritiesType GetPriority ( ) const
inline

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

Returns
The priority of this plugin.

Definition at line 68 of file lang/plugins.hpp.


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