CbmRoot
Loading...
Searching...
No Matches
Composite Struct Reference

A composite of optional A, B and C. More...

Public Member Functions

template<class Visitor>
void ForEachValue (Visitor &&visitor)
 A for-each method, which is applied to each VARIABLE.
 
template<class Visitor>
void ForEachValue (Visitor &&visitor) const
 A for-each method, which is applied to each VARIABLE.
 
template<class Visitor>
void ForEachVariable (Visitor &&visitor)
 A for-each method, which is applied to a VALUE stored in each variable.
 
template<class Visitor>
void ForEachVariable (Visitor &&visitor) const
 A for-each method, which is applied to a VALUE stored in each variable.
 

Public Attributes

std::optional< AfA
 
std::optional< BfB
 
std::optional< CfC
 

Static Private Attributes

static constexpr auto kLooper = cbm::util::StructLooper(&Composite::fA, &Composite::fB, &Composite::fC)
 

Detailed Description

A composite of optional A, B and C.

Definition at line 79 of file _GTestStructLooper.cxx.

Member Function Documentation

◆ ForEachValue() [1/2]

template<class Visitor>
void Composite::ForEachValue ( Visitor && visitor)
inline

A for-each method, which is applied to each VARIABLE.

Parameters
visitorA callable visitor
Note
If the variable is std::optional<T>, the argument of the visitor is treated as std::optional<T>.

Definition at line 84 of file _GTestStructLooper.cxx.

References kLooper.

Referenced by CompositeApplication::GetNumberOfStationsWithHits(), CompositeApplication::GetPropertySum(), and CompositeApplication::SetProperty().

◆ ForEachValue() [2/2]

template<class Visitor>
void Composite::ForEachValue ( Visitor && visitor) const
inline

A for-each method, which is applied to each VARIABLE.

Parameters
visitorA callable visitor
Note
If the variable is std::optional<T>, the argument of the visitor is treated as std::optional<T>.

Definition at line 93 of file _GTestStructLooper.cxx.

References kLooper.

◆ ForEachVariable() [1/2]

template<class Visitor>
void Composite::ForEachVariable ( Visitor && visitor)
inline

A for-each method, which is applied to a VALUE stored in each variable.

Parameters
visitorA callable visitor
Note
If the variable is std::optional<T>, the argument of the visitor is T

Definition at line 102 of file _GTestStructLooper.cxx.

References kLooper.

Referenced by CompositeApplication::GetNofNonNullopt().

◆ ForEachVariable() [2/2]

template<class Visitor>
void Composite::ForEachVariable ( Visitor && visitor) const
inline

A for-each method, which is applied to a VALUE stored in each variable.

Parameters
visitorA callable visitor
Note
If the variable is std::optional<T>, the argument of the visitor is T

Definition at line 111 of file _GTestStructLooper.cxx.

References kLooper.

Member Data Documentation

◆ fA

std::optional<A> Composite::fA

Definition at line 116 of file _GTestStructLooper.cxx.

◆ fB

std::optional<B> Composite::fB

Definition at line 117 of file _GTestStructLooper.cxx.

◆ fC

std::optional<C> Composite::fC

Definition at line 118 of file _GTestStructLooper.cxx.

◆ kLooper

auto Composite::kLooper = cbm::util::StructLooper(&Composite::fA, &Composite::fB, &Composite::fC)
staticconstexprprivate

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