Celeritas  0.5.0-86+4a8eea4
Public Member Functions | List of all members
celeritas::TransformVisitor Class Reference

Apply a functor to a type-deleted transform. More...

#include <TransformVisitor.hh>

Public Types

Type aliases
using ParamsRef = NativeCRef< OrangeParamsData >
 
using TransformRecords = Items< TransformRecord >
 
using Reals = Items< real_type >
 

Public Member Functions

CELER_FUNCTION TransformVisitor (TransformRecords const &transforms, Reals const &reals)
 Construct manually from required data.
 
CELER_FUNCTION TransformVisitor (ParamsRef const &params)
 Construct from ORANGE data.
 
template<class F >
decltype(auto) CELER_FUNCTION operator() (F &&typed_visitor, TransformId t)
 

Detailed Description

Apply a functor to a type-deleted transform.

An instance of this class is like std::visit but accepting a TransformId rather than a std::variant .

Example:

TransformVisitor visit_transform{params_};
auto new_pos = visit_transform(
[&pos](auto&& t) { return t.transform_up(pos); },
daughter.transform_id);
CELER_FUNCTION TransformVisitor(TransformRecords const &transforms, Reals const &reals)
Construct manually from required data.
Definition: TransformVisitor.hh:76

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