Celeritas 0.7.0-dev.169+develop.bdc0041f6
Loading...
Searching...
No Matches
Classes | Macros | Functions
UnivTypeTraits.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::UnivTypeTraits< UnivType::simple >
 
struct  celeritas::UnivTypeTraits< UnivType::rect_array >
 

Macros

#define ORANGE_UNIV_TRAITS(ENUM_VALUE, CLS)
 
#define ORANGE_UT_VISIT_CASE(TYPE)
 

Functions

template<class F >
CELER_CONSTEXPR_FUNCTION decltype(autoceleritas::visit_univ_type (F &&func, UnivType ut)
 Expand a macro to a switch statement over all possible universe types.
 

Macro Definition Documentation

◆ ORANGE_UNIV_TRAITS

#define ORANGE_UNIV_TRAITS (   ENUM_VALUE,
  CLS 
)
Value:
template<> \
struct UnivTypeTraits<UnivType::ENUM_VALUE> \
{ \
using record_type = CLS##Record; \
using tracker_type = CLS##Tracker; \
}

◆ ORANGE_UT_VISIT_CASE

#define ORANGE_UT_VISIT_CASE (   TYPE)
Value:
case UnivType::TYPE: \
return celeritas::forward<F>(func)(UnivTypeTraits<UnivType::TYPE>{})

Function Documentation

◆ visit_univ_type()

template<class F >
CELER_CONSTEXPR_FUNCTION decltype(auto) celeritas::visit_univ_type ( F &&  func,
UnivType  ut 
)

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

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