PLaSK library
Loading...
Searching...
No Matches
plask::Property< _propertyType, _ValueType2D, _ValueType3D, _ExtraParams > Struct Template Reference

Helper class which makes it easier to define property tags class. More...

#include <plask/provider/providerfor.hpp>

Inheritance diagram for plask::Property< _propertyType, _ValueType2D, _ValueType3D, _ExtraParams >:
[legend]
Collaboration diagram for plask::Property< _propertyType, _ValueType2D, _ValueType3D, _ExtraParams >:
[legend]

Public Types

typedef _ValueType2D ValueType2D
 Type of provided value in 2D space.
 
typedef _ValueType3D ValueType3D
 Type of provided value in 3D space.
 
typedef VariadicTemplateTypesHolder< _ExtraParams... > ExtraParams
 Extra parameters passed as arguments to provider to get value.
 

Static Public Member Functions

static ValueType2D getDefaultValue2D ()
 Return default value of the property (usually zero) in 2D space.
 
static ValueType3D getDefaultValue3D ()
 Return default value of the property (usually zero) in 3D space.
 

Static Public Attributes

static const PropertyType propertyType = _propertyType
 Type of property.
 
static constexpr const charNAME = PropertyTypeToProviderName<_propertyType>::value
 Name of the property.
 
static constexpr bool hasUniqueValueType = false
 true only if property use same value type in 2D and 3D space
 

Detailed Description

template<PropertyType _propertyType, typename _ValueType2D, typename _ValueType3D, typename... _ExtraParams>
struct plask::Property< _propertyType, _ValueType2D, _ValueType3D, _ExtraParams >

Helper class which makes it easier to define property tags class.

Property tags class are used for ProviderFor and ReceiverFor templates instantiations.

Properties tag class can be subclass of this, but never should be typedefs to this (tag class for each property must by separate class - always use different types for different properties).

Template Parameters
_propertyTypetype of property
_ValueType2Dtype of value (or part of this type) which will be provided in 2D space
_ValueType3Dtype of value (or part of this type) which will be provided in 3D space
_ExtraParamstype of extra parameters passed to provider

Definition at line 80 of file providerfor.hpp.

Member Typedef Documentation

◆ ExtraParams

template<PropertyType _propertyType, typename _ValueType2D , typename _ValueType3D , typename... _ExtraParams>
typedef VariadicTemplateTypesHolder<_ExtraParams...> plask::Property< _propertyType, _ValueType2D, _ValueType3D, _ExtraParams >::ExtraParams

Extra parameters passed as arguments to provider to get value.

Definition at line 100 of file providerfor.hpp.

◆ ValueType2D

Type of provided value in 2D space.

Definition at line 85 of file providerfor.hpp.

◆ ValueType3D

Type of provided value in 3D space.

Definition at line 88 of file providerfor.hpp.

Member Function Documentation

◆ getDefaultValue2D()

template<PropertyType _propertyType, typename _ValueType2D , typename _ValueType3D , typename... _ExtraParams>
static ValueType2D plask::Property< _propertyType, _ValueType2D, _ValueType3D, _ExtraParams >::getDefaultValue2D ( )
inlinestatic

Return default value of the property (usually zero) in 2D space.

Definition at line 94 of file providerfor.hpp.

◆ getDefaultValue3D()

template<PropertyType _propertyType, typename _ValueType2D , typename _ValueType3D , typename... _ExtraParams>
static ValueType3D plask::Property< _propertyType, _ValueType2D, _ValueType3D, _ExtraParams >::getDefaultValue3D ( )
inlinestatic

Return default value of the property (usually zero) in 3D space.

Definition at line 97 of file providerfor.hpp.

Member Data Documentation

◆ hasUniqueValueType

template<PropertyType _propertyType, typename _ValueType2D , typename _ValueType3D , typename... _ExtraParams>
constexpr bool plask::Property< _propertyType, _ValueType2D, _ValueType3D, _ExtraParams >::hasUniqueValueType = false
staticconstexpr

true only if property use same value type in 2D and 3D space

Definition at line 103 of file providerfor.hpp.

◆ NAME

Name of the property.

Definition at line 91 of file providerfor.hpp.

◆ propertyType

Type of property.

Definition at line 82 of file providerfor.hpp.


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