PLaSK library

Loading...
Searching...
No Matches
Public Types | Static Public Member Functions | Static Public Attributes | List of all members
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 char * | NAME = 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

  _propertyType | type of property
  _ValueType2D | type of value (or part of this type) which will be provided in 2D space
  _ValueType3D | type of value (or part of this type) which will be provided in 3D space
  _ExtraParams | type 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

template<PropertyType _propertyType, typename _ValueType2D , typename _ValueType3D , typename... _ExtraParams>

typedef _ValueType2D plask::Property< _propertyType, _ValueType2D, _ValueType3D, _ExtraParams >::ValueType2D

Type of provided value in 2D space.

Definition at line 85 of file providerfor.hpp.

## ◆ ValueType3D

template<PropertyType _propertyType, typename _ValueType2D , typename _ValueType3D , typename... _ExtraParams>

typedef _ValueType3D plask::Property< _propertyType, _ValueType2D, _ValueType3D, _ExtraParams >::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 | ( |  | ) |
| inline static

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 | ( |  | ) |
| inline static

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
| static constexpr

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

Definition at line 103 of file providerfor.hpp.

## ◆ NAME

template<PropertyType _propertyType, typename _ValueType2D , typename _ValueType3D , typename... _ExtraParams>

constexpr const char* plask::Property< _propertyType, _ValueType2D, _ValueType3D, _ExtraParams >::NAME = PropertyTypeToProviderName<_propertyType>::value
| static constexpr

Name of the property.

Definition at line 91 of file providerfor.hpp.

## ◆ propertyType

template<PropertyType _propertyType, typename _ValueType2D , typename _ValueType3D , typename... _ExtraParams>

const PropertyType plask::Property< _propertyType, _ValueType2D, _ValueType3D, _ExtraParams >::propertyType = _propertyType
| static

Type of property.

Definition at line 82 of file providerfor.hpp.

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

- plask/provider/providerfor.hpp