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

Classes

struct  celeritas::SurfaceTypeTraits< SurfaceType::px >
 
struct  celeritas::SurfaceTypeTraits< SurfaceType::py >
 
struct  celeritas::SurfaceTypeTraits< SurfaceType::pz >
 
struct  celeritas::SurfaceTypeTraits< SurfaceType::cxc >
 
struct  celeritas::SurfaceTypeTraits< SurfaceType::cyc >
 
struct  celeritas::SurfaceTypeTraits< SurfaceType::czc >
 
struct  celeritas::SurfaceTypeTraits< SurfaceType::sc >
 
struct  celeritas::SurfaceTypeTraits< SurfaceType::cx >
 
struct  celeritas::SurfaceTypeTraits< SurfaceType::cy >
 
struct  celeritas::SurfaceTypeTraits< SurfaceType::cz >
 
struct  celeritas::SurfaceTypeTraits< SurfaceType::p >
 
struct  celeritas::SurfaceTypeTraits< SurfaceType::s >
 
struct  celeritas::SurfaceTypeTraits< SurfaceType::kx >
 
struct  celeritas::SurfaceTypeTraits< SurfaceType::ky >
 
struct  celeritas::SurfaceTypeTraits< SurfaceType::kz >
 
struct  celeritas::SurfaceTypeTraits< SurfaceType::sq >
 
struct  celeritas::SurfaceTypeTraits< SurfaceType::gq >
 
struct  celeritas::SurfaceTypeTraits< SurfaceType::inv >
 

Macros

#define ORANGE_SURFACE_TRAITS(ENUM_VALUE, CLS)
 
#define ORANGE_ST_VISIT_CASE(TYPE)
 

Functions

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

Macro Definition Documentation

◆ ORANGE_ST_VISIT_CASE

#define ORANGE_ST_VISIT_CASE (   TYPE)
Value:
case SurfaceType::TYPE: \
return celeritas::forward<F>(func)( \
SurfaceTypeTraits<SurfaceType::TYPE>{})

◆ ORANGE_SURFACE_TRAITS

#define ORANGE_SURFACE_TRAITS (   ENUM_VALUE,
  CLS 
)
Value:
template<> \
struct SurfaceTypeTraits<SurfaceType::ENUM_VALUE> \
: public EnumToClass<SurfaceType, SurfaceType::ENUM_VALUE, CLS> \
{ \
}

Function Documentation

◆ visit_surface_type()

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

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

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