Celeritas 0.6.0-dev.115+3b60a5fd
Loading...
Searching...
No Matches
Public Member Functions | List of all members
celeritas::TrackerVisitor Class Reference

Apply a functor to a universe tracker of unknown type. More...

#include <TrackerVisitor.hh>

Public Types

Type aliases
using ParamsRef = NativeCRef< OrangeParamsData >
 

Public Member Functions

CELER_FUNCTION TrackerVisitor (ParamsRef const &params)
 Construct from ORANGE params.
 
template<class F >
CELER_FUNCTION decltype(autooperator() (F &&func, UniverseId id)
 

Detailed Description

Apply a functor to a universe tracker of unknown type.

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

Example:

TrackerVisitor visit_tracker{params_};
auto new_pos = visit_tracker(
[&pos](auto&& u) { return u.initialize(pos); },
univ_id);
Apply a functor to a universe tracker of unknown type.
Definition TrackerVisitor.hh:33

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