|
PLaSK library
|
Implementation of one value provider class which holds value inside (in value field) and operator() returns its held value. More...
#include <plask/provider/providerfor.hpp>
Public Types | |
| typedef ValueType | ProvidedType |
| Type of provided value. | |
Public Types inherited from plask::ProviderFor< PropertyT, SpaceT > | |
| typedef PropertyT | PropertyTag |
| typedef SpaceT | SpaceType |
Public Member Functions | |
| WithDefaultValue (const std::initializer_list< ProvidedType > &values, const ProvidedType &defval=ProvidedType()) | |
| Construct values. | |
| template<typename Iterator > | |
| WithDefaultValue (const Iterator &begin, const Iterator &end, const ProvidedType &defval=ProvidedType()) | |
| Construct values from iterator. | |
| WithDefaultValue (const ProvidedType &defval=ProvidedType()) | |
| Construct default value. | |
| ProvidedType & | operator[] (size_t n) |
| Access value. | |
| void | resize (size_t n) |
| Change number of values. | |
| size_t | size () const override |
| Get number of values. | |
| ProvidedType | operator() (EnumType num, _ExtraParams...) const override |
| Get provided value. | |
Public Member Functions inherited from plask::ProviderFor< PropertyT, SpaceT > | |
| ProviderFor (Args &&... params) | |
| Delegate all constructors to parent class. | |
Public Attributes | |
| ProvidedType | default_value |
| Default value. | |
| std::vector< ProvidedType > | values |
| Provided values. | |
Implementation of one value provider class which holds value inside (in value field) and operator() returns its held value.
It always has a value.
It ignores extra parameters.
Definition at line 798 of file providerfor.hpp.
| typedef ValueType plask::ProviderImpl< PropertyT, MULTI_VALUE_PROPERTY, SpaceT, VariadicTemplateTypesHolder< _ExtraParams... > >::WithDefaultValue::ProvidedType |
Type of provided value.
Definition at line 801 of file providerfor.hpp.
|
inline |
Construct values.
Definition at line 810 of file providerfor.hpp.
|
inlineexplicit |
Construct values from iterator.
Definition at line 814 of file providerfor.hpp.
|
inline |
Construct default value.
Definition at line 817 of file providerfor.hpp.
|
inlineoverride |
|
inline |
Access value.
| n | value index |
Definition at line 824 of file providerfor.hpp.
|
inline |
Change number of values.
| n | number of values |
Definition at line 837 of file providerfor.hpp.
|
inlineoverride |
| ProvidedType plask::ProviderImpl< PropertyT, MULTI_VALUE_PROPERTY, SpaceT, VariadicTemplateTypesHolder< _ExtraParams... > >::WithDefaultValue::default_value |
Default value.
Definition at line 804 of file providerfor.hpp.
| std::vector<ProvidedType> plask::ProviderImpl< PropertyT, MULTI_VALUE_PROPERTY, SpaceT, VariadicTemplateTypesHolder< _ExtraParams... > >::WithDefaultValue::values |
Provided values.
Definition at line 807 of file providerfor.hpp.