PLaSK library
Loading...
Searching...
No Matches
plask::SingleValueProvider< ValueT, ArgsT > Struct Template Referenceabstract

Instantiation of this template is abstract base class for provider which provide one value (for example one double). More...

#include <plask/provider/provider.hpp>

Inheritance diagram for plask::SingleValueProvider< ValueT, ArgsT >:
[legend]
Collaboration diagram for plask::SingleValueProvider< ValueT, ArgsT >:
[legend]

Public Types

typedef ValueT ProvidedType
 Type of provided value.
 

Public Member Functions

const charname () const override
 
virtual ProvidedType operator() (ArgsT...) const =0
 Provided value getter.
 
- Public Member Functions inherited from plask::Provider
Provideroperator= (const Provider &)=delete
 
 Provider (const Provider &)=delete
 
 Provider ()=default
 
virtual ~Provider ()
 Call onDisconnect for all listeners in listeners set.
 
void fireChanged ()
 Call onChange for all listeners.
 

Static Public Attributes

static constexpr const charNAME = "undefined value"
 
- Static Public Attributes inherited from plask::Provider
static constexpr const charNAME = "undefined"
 

Additional Inherited Members

- Public Attributes inherited from plask::Provider
boost::signals2::signal< void(Provider &, bool)> changed
 Signal called when providers value has been changed or provider is being deleted.
 

Detailed Description

template<typename ValueT, typename... ArgsT>
struct plask::SingleValueProvider< ValueT, ArgsT >

Instantiation of this template is abstract base class for provider which provide one value (for example one double).

Template Parameters
ValueTtype of provided value
ArgsTtype of arguments required by provider (optional)

Definition at line 457 of file provider.hpp.

Member Typedef Documentation

◆ ProvidedType

template<typename ValueT , typename... ArgsT>
typedef ValueT plask::SingleValueProvider< ValueT, ArgsT >::ProvidedType

Type of provided value.

Definition at line 463 of file provider.hpp.

Member Function Documentation

◆ name()

template<typename ValueT , typename... ArgsT>
const char * plask::SingleValueProvider< ValueT, ArgsT >::name ( ) const
inlineoverridevirtual

Reimplemented from plask::Provider.

Definition at line 460 of file provider.hpp.

◆ operator()()

template<typename ValueT , typename... ArgsT>
virtual ProvidedType plask::SingleValueProvider< ValueT, ArgsT >::operator() ( ArgsT...  ) const
pure virtual

Provided value getter.

Returns
provided value

Member Data Documentation

◆ NAME

template<typename ValueT , typename... ArgsT>
constexpr const char* plask::SingleValueProvider< ValueT, ArgsT >::NAME = "undefined value"
staticconstexpr

Definition at line 459 of file provider.hpp.


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