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

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

#include <plask/provider/provider.hpp>

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

Public Types

typedef ValueT ProvidedType
 Type of provided value.
 
typedef EnumT EnumType
 Type of value number.
 

Public Member Functions

const charname () const override
 
virtual ProvidedType operator() (EnumT num, ArgsT...) const =0
 Provided value getter.
 
virtual size_t size () const =0
 Get number of values.
 
- 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 EnumT, typename... ArgsT>
struct plask::MultiValueProvider< ValueT, EnumT, ArgsT >

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

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

Definition at line 479 of file provider.hpp.

Member Typedef Documentation

◆ EnumType

template<typename ValueT , typename EnumT , typename... ArgsT>
typedef EnumT plask::MultiValueProvider< ValueT, EnumT, ArgsT >::EnumType

Type of value number.

Definition at line 488 of file provider.hpp.

◆ ProvidedType

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

Type of provided value.

Definition at line 485 of file provider.hpp.

Member Function Documentation

◆ name()

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

◆ operator()()

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

Provided value getter.

Returns
provided value

◆ size()

template<typename ValueT , typename EnumT , typename... ArgsT>
virtual size_t plask::MultiValueProvider< ValueT, EnumT, ArgsT >::size ( ) const
pure virtual

Get number of values.

Returns
number of values

Member Data Documentation

◆ NAME

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

Definition at line 481 of file provider.hpp.


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