lintel 0.2.0
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
lintel::Feature< T, > Class Template Referenceabstract

#include <Feature.h>

Inheritance diagram for lintel::Feature< T, >:
lintel::FeatureInterface

Public Member Functions

 Feature (T type, std::shared_ptr< Features > features)
 
virtual ~Feature ()=default
 
virtual void registerTypes (lintel::di::ContainerBuilder &builder)=0
 
virtual void initialize (std::shared_ptr< lintel::di::Container > container)=0
 
std::string_view getName ()
 
- Public Member Functions inherited from lintel::FeatureInterface
virtual ~FeatureInterface ()=default
 
virtual void registerTypes (lintel::di::ContainerBuilder &builder, const std::shared_ptr< Configuration > &configuration, const std::shared_ptr< ProcessName > &processName)
 

Protected Attributes

std::string_view m_name
 

Detailed Description

template<typename T, std::enable_if_t< std::is_enum_v< T > > * = nullptr>
class lintel::Feature< T, >

Base template class for enum-based features that auto-register with the Features manager

Constructor & Destructor Documentation

◆ Feature()

template<typename T , std::enable_if_t< std::is_enum_v< T > > * = nullptr>
lintel::Feature< T, >::Feature ( T  type,
std::shared_ptr< Features >  features 
)
inline

Construct a feature and register it with the central Features manager

Parameters
typeThe enum value identifying this feature
featuresThe central Features manager instance

◆ ~Feature()

template<typename T , std::enable_if_t< std::is_enum_v< T > > * = nullptr>
virtual lintel::Feature< T, >::~Feature ( )
virtualdefault

Virtual destructor

Member Function Documentation

◆ getName()

template<typename T , std::enable_if_t< std::is_enum_v< T > > * = nullptr>
std::string_view lintel::Feature< T, >::getName ( )
inlinevirtual

Get the name of this feature

Returns
The feature name as a string view

Implements lintel::FeatureInterface.

◆ initialize()

template<typename T , std::enable_if_t< std::is_enum_v< T > > * = nullptr>
virtual void lintel::Feature< T, >::initialize ( std::shared_ptr< lintel::di::Container >  container)
pure virtual

Initialize the feature with the resolved container

Implements lintel::FeatureInterface.

Implemented in lintel::BaseFeature, lintel::CommandLineFeature, lintel::HttpFeature, and lintel::PropertyFeature.

◆ registerTypes()

template<typename T , std::enable_if_t< std::is_enum_v< T > > * = nullptr>
virtual void lintel::Feature< T, >::registerTypes ( lintel::di::ContainerBuilder &  builder)
pure virtual

Register dependency injection types for this feature

Implements lintel::FeatureInterface.

Implemented in lintel::BaseFeature, lintel::CommandLineFeature, lintel::HttpFeature, and lintel::PropertyFeature.

Member Data Documentation

◆ m_name

template<typename T , std::enable_if_t< std::is_enum_v< T > > * = nullptr>
std::string_view lintel::Feature< T, >::m_name
protected

The name of this feature derived from the enum value


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