Lunchbox  1.16.0
Multi-threaded C++ toolbox library for all application developers creating high-performance multi-threaded programs.
lunchbox::Plugin< T > Class Template Reference
+ Collaboration diagram for lunchbox::Plugin< T >:

Public Types

using Constructor = std::function< T *(const typename T::InitDataT &)>
 The constructor method for Plugin objects. More...
 
using HandlesFunc = std::function< bool(const typename T::InitDataT &)>
 The method to check if the plugin can handle a given initData. More...
 
using DescriptionFunc = std::function< std::string()>
 The method to get the plugin's description. More...
 

Public Member Functions

 Plugin (const Constructor &constructor, const HandlesFunc &handles_, const DescriptionFunc &description)
 Construct a new Plugin. More...
 
T * construct (const typename T::InitDataT &data) const
 Construct a new plugin instance. More...
 
bool handles (const typename T::InitDataT &data) const
 
std::string getDescription () const
 

Detailed Description

template<class T>
class lunchbox::Plugin< T >

Definition at line 32 of file plugin.h.

Member Typedef Documentation

template<class T >
using lunchbox::Plugin< T >::Constructor = std::function<T*(const typename T::InitDataT&)>

The constructor method for Plugin objects.

Version
1.11.0

Definition at line 36 of file plugin.h.

template<class T >
using lunchbox::Plugin< T >::DescriptionFunc = std::function<std::string()>

The method to get the plugin's description.

Version
1.16

Definition at line 45 of file plugin.h.

template<class T >
using lunchbox::Plugin< T >::HandlesFunc = std::function<bool(const typename T::InitDataT&)>

The method to check if the plugin can handle a given initData.

Version
1.11.0

Definition at line 42 of file plugin.h.

Constructor & Destructor Documentation

template<class T >
lunchbox::Plugin< T >::Plugin ( const Constructor constructor,
const HandlesFunc handles_,
const DescriptionFunc description 
)
inline

Construct a new Plugin.

Parameters
constructorThe constructor method for Plugin objects.
handles_The method to check if the plugin can handle the initData.
descriptionmethod to get the the help for the plugin
Version
1.11.0

Definition at line 55 of file plugin.h.

Member Function Documentation

template<class T >
T* lunchbox::Plugin< T >::construct ( const typename T::InitDataT &  data) const
inline

Construct a new plugin instance.

Version
1.14

Definition at line 64 of file plugin.h.

template<class T >
std::string lunchbox::Plugin< T >::getDescription ( ) const
inline
Returns
the plugin's description.
Version
1.17

Definition at line 76 of file plugin.h.

template<class T >
bool lunchbox::Plugin< T >::handles ( const typename T::InitDataT &  data) const
inline
Returns
true if this plugin handles the given request.
Version
1.14

Definition at line 70 of file plugin.h.


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