OpenLB 1.7
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
olb::ParameterD< T, DESCRIPTOR, FIELD > Class Template Reference

Storage of a single FIELD-valued parameter. More...

#include <fieldParametersD.h>

+ Inheritance diagram for olb::ParameterD< T, DESCRIPTOR, FIELD >:
+ Collaboration diagram for olb::ParameterD< T, DESCRIPTOR, FIELD >:

Public Types

using data_t = decltype(_data)
 

Public Member Functions

 ParameterD ()=default
 
template<typename V >
 ParameterD (const ParameterD< V, DESCRIPTOR, FIELD > &rhs) any_platform
 
const auto & read () const any_platform
 
auto & read () any_platform
 
void write (FieldD< T, DESCRIPTOR, FIELD > &&value) any_platform
 
void write (const FieldD< T, DESCRIPTOR, FIELD > &value) any_platform
 

Detailed Description

template<typename T, typename DESCRIPTOR, typename FIELD>
class olb::ParameterD< T, DESCRIPTOR, FIELD >

Storage of a single FIELD-valued parameter.

Definition at line 35 of file fieldParametersD.h.

Member Typedef Documentation

◆ data_t

template<typename T , typename DESCRIPTOR , typename FIELD >
using olb::ParameterD< T, DESCRIPTOR, FIELD >::data_t = decltype(_data)

Definition at line 44 of file fieldParametersD.h.

Constructor & Destructor Documentation

◆ ParameterD() [1/2]

template<typename T , typename DESCRIPTOR , typename FIELD >
olb::ParameterD< T, DESCRIPTOR, FIELD >::ParameterD ( )
default

◆ ParameterD() [2/2]

template<typename T , typename DESCRIPTOR , typename FIELD >
template<typename V >
olb::ParameterD< T, DESCRIPTOR, FIELD >::ParameterD ( const ParameterD< V, DESCRIPTOR, FIELD > & rhs)
inline

Definition at line 49 of file fieldParametersD.h.

49 :
50 _data(rhs.read()) { }

Member Function Documentation

◆ read() [1/2]

template<typename T , typename DESCRIPTOR , typename FIELD >
auto & olb::ParameterD< T, DESCRIPTOR, FIELD >::read ( )
inline

Definition at line 56 of file fieldParametersD.h.

56 {
57 return _data;
58 }

◆ read() [2/2]

template<typename T , typename DESCRIPTOR , typename FIELD >
const auto & olb::ParameterD< T, DESCRIPTOR, FIELD >::read ( ) const
inline

Definition at line 52 of file fieldParametersD.h.

52 {
53 return _data;
54 }

◆ write() [1/2]

template<typename T , typename DESCRIPTOR , typename FIELD >
void olb::ParameterD< T, DESCRIPTOR, FIELD >::write ( const FieldD< T, DESCRIPTOR, FIELD > & value)
inline

Definition at line 68 of file fieldParametersD.h.

68 {
69 if constexpr (DESCRIPTOR::template size<FIELD>() == 1) {
70 _data = value[0];
71 } else {
72 _data = value;
73 }
74 }
typename std::integral_constant< TYPE, VALUE >::type value
Identity type to wrap non-type template arguments.
Definition meta.h:96

◆ write() [2/2]

template<typename T , typename DESCRIPTOR , typename FIELD >
void olb::ParameterD< T, DESCRIPTOR, FIELD >::write ( FieldD< T, DESCRIPTOR, FIELD > && value)
inline

Definition at line 60 of file fieldParametersD.h.

60 {
61 if constexpr (DESCRIPTOR::template size<FIELD>() == 1) {
62 _data = value[0];
63 } else {
64 _data = value;
65 }
66 }

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