Celeritas  0.5.0-86+4a8eea4
Classes | Macros | Functions
TransformTypeTraits.hh File Reference
#include "corecel/math/Algorithms.hh"
#include "orange/OrangeTypes.hh"
This graph shows which files directly or indirectly include this file:

Classes

struct  celeritas::TransformTypeTraits< TransformType::no_transformation >
 
struct  celeritas::TransformTypeTraits< TransformType::translation >
 
struct  celeritas::TransformTypeTraits< TransformType::transformation >
 

Macros

#define ORANGE_TRANSFORM_TRAITS(ENUM_VALUE, CLS)
 
#define ORANGE_TT_VISIT_CASE(TYPE)
 

Functions

template<class F >
decltype(auto) CELER_CONSTEXPR_FUNCTION celeritas::visit_transform_type (F &&func, TransformType st)
 Expand a macro to a switch statement over all possible transform types. More...
 

Macro Definition Documentation

◆ ORANGE_TRANSFORM_TRAITS

#define ORANGE_TRANSFORM_TRAITS (   ENUM_VALUE,
  CLS 
)
Value:
template<> \
struct TransformTypeTraits<TransformType::ENUM_VALUE> \
{ \
using type = CLS; \
}

◆ ORANGE_TT_VISIT_CASE

#define ORANGE_TT_VISIT_CASE (   TYPE)
Value:
case TransformType::TYPE: \
return celeritas::forward<F>(func)( \
TransformTypeTraits<TransformType::TYPE>{})

Function Documentation

◆ visit_transform_type()

template<class F >
decltype(auto) CELER_CONSTEXPR_FUNCTION celeritas::visit_transform_type ( F &&  func,
TransformType  st 
)

Expand a macro to a switch statement over all possible transform types.

The func argument should be a functor that takes a single argument which is a TransformTypeTraits instance.