knowrob  2.1.0
A Knowledge Base System for Cognition-enabled Robots
knowrob::NamedPlugin< T > Class Template Reference

#include <NamedPlugin.h>

Public Member Functions

 NamedPlugin (std::string_view name, PluginLanguage language, const std::shared_ptr< T > &plugin)
 
const std::shared_ptr< T > & operator() () const
 
const std::shared_ptr< T > & value () const
 
std::string_view name () const
 
PluginLanguage language () const
 
 NamedPlugin (std::string_view name, PluginLanguage language, const std::shared_ptr< T > &plugin)
 
const std::shared_ptr< T > & operator() () const
 
const std::shared_ptr< T > & value () const
 
std::string_view name () const
 
PluginLanguage language () const
 

Protected Attributes

const std::string name_
 
const std::shared_ptr< T > plugin_
 
const PluginLanguage language_
 

Detailed Description

template<class T>
class knowrob::NamedPlugin< T >

A plugin with a name.

Definition at line 25 of file NamedPlugin.h.

Constructor & Destructor Documentation

◆ NamedPlugin() [1/2]

template<class T >
knowrob::NamedPlugin< T >::NamedPlugin ( std::string_view  name,
PluginLanguage  language,
const std::shared_ptr< T > &  plugin 
)
inline
Parameters
namethe name of the plugin
languagethe language of the plugin
pluginthe plugin instance

Definition at line 32 of file NamedPlugin.h.

33  : name_(name), plugin_(plugin), language_(language) {}
const std::shared_ptr< T > plugin_
Definition: NamedPlugin.h:57
std::string_view name() const
Definition: NamedPlugin.h:48
const std::string name_
Definition: NamedPlugin.h:56
const PluginLanguage language_
Definition: NamedPlugin.h:58
PluginLanguage language() const
Definition: NamedPlugin.h:53

◆ NamedPlugin() [2/2]

template<class T >
knowrob::NamedPlugin< T >::NamedPlugin ( std::string_view  name,
PluginLanguage  language,
const std::shared_ptr< T > &  plugin 
)
inline
Parameters
namethe name of the plugin
languagethe language of the plugin
pluginthe plugin instance

Definition at line 32 of file NamedPlugin.h.

33  : name_(name), plugin_(plugin), language_(language) {}

Member Function Documentation

◆ language() [1/2]

template<class T >
PluginLanguage knowrob::NamedPlugin< T >::language ( ) const
inline
Returns
the plugin language.

Definition at line 53 of file NamedPlugin.h.

53 { return language_; }

◆ language() [2/2]

template<class T >
PluginLanguage knowrob::NamedPlugin< T >::language ( ) const
inline
Returns
the plugin language.

Definition at line 53 of file NamedPlugin.h.

53 { return language_; }

◆ name() [1/2]

template<class T >
std::string_view knowrob::NamedPlugin< T >::name ( ) const
inline
Returns
the plugin name.

Definition at line 48 of file NamedPlugin.h.

48 { return name_; }

◆ name() [2/2]

template<class T >
std::string_view knowrob::NamedPlugin< T >::name ( ) const
inline
Returns
the plugin name.

Definition at line 48 of file NamedPlugin.h.

48 { return name_; }

◆ operator()() [1/2]

template<class T >
const std::shared_ptr<T>& knowrob::NamedPlugin< T >::operator() ( ) const
inline
Returns
the plugin instance

Definition at line 38 of file NamedPlugin.h.

38 { return plugin_; }

◆ operator()() [2/2]

template<class T >
const std::shared_ptr<T>& knowrob::NamedPlugin< T >::operator() ( ) const
inline
Returns
the plugin instance

Definition at line 38 of file NamedPlugin.h.

38 { return plugin_; }

◆ value() [1/2]

template<class T >
const std::shared_ptr<T>& knowrob::NamedPlugin< T >::value ( ) const
inline
Returns
the plugin instance

Definition at line 43 of file NamedPlugin.h.

43 { return plugin_; }

◆ value() [2/2]

template<class T >
const std::shared_ptr<T>& knowrob::NamedPlugin< T >::value ( ) const
inline
Returns
the plugin instance

Definition at line 43 of file NamedPlugin.h.

43 { return plugin_; }

Member Data Documentation

◆ language_

template<class T >
const PluginLanguage knowrob::NamedPlugin< T >::language_
protected

Definition at line 58 of file NamedPlugin.h.

◆ name_

template<class T >
const std::string knowrob::NamedPlugin< T >::name_
protected

Definition at line 56 of file NamedPlugin.h.

◆ plugin_

template<class T >
const std::shared_ptr< T > knowrob::NamedPlugin< T >::plugin_
protected

Definition at line 57 of file NamedPlugin.h.


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