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

Pure abstract interface for an action that could happen to a track. More...

#include <ActionInterface.hh>

Inheritance diagram for celeritas::ActionInterface:
Inheritance graph
[legend]

Public Member Functions

virtual ~ActionInterface () noexcept=0
 Default destructor.
 
virtual ActionId action_id () const =0
 ID of this action for verification and ordering.
 
virtual std::string_view label () const =0
 Short unique label of the action.
 
virtual std::string_view description () const =0
 Description of the action.
 

Protected Member Functions

 ActionInterface ()=default
 
 CELER_DEFAULT_COPY_MOVE (ActionInterface)
 

Detailed Description

Pure abstract interface for an action that could happen to a track.

An action represents a possible state point or state change for a track. Explicit actions (see StepActionInterface ) call kernels that change the state (discrete processes, geometry boundary), and implicit actions (which do not inherit from the explicit interface) are placeholders for different reasons to pause the state or mark it for future modification (range limitation, propagation loop limit).

The ActionInterface provides a clean virtual interface for gathering metadata. The StepActionInterface provides additional interfaces for launching kernels. The BeginRunActionInterface allows actions to modify the state (or the class instance itself) at the beginning of a stepping loop, and EndRunActionInterface allows actions to gather and merge multiple state information at the end.

Using multiple inheritance, you can create an action that inherits from multiple of these classes. Note also that the function signatures are similar to other high-level interfaces classes in Celeritas (e.g., AuxParamsInterface, OutputInterface), so one "label" can be used to satisfy multiple interfaces.

The label should be a brief lowercase hyphen-separated string, usually a noun, with perhaps some sort of category being the first token.

The description should be a verb phrase (and not have a title-cased start).

Constructor & Destructor Documentation

◆ ActionInterface()

celeritas::ActionInterface::ActionInterface ( )
protecteddefault

Allow construction and assignment only through daughter classes

Member Function Documentation

◆ CELER_DEFAULT_COPY_MOVE()

celeritas::ActionInterface::CELER_DEFAULT_COPY_MOVE ( ActionInterface  )
protected

Allow construction and assignment only through daughter classes


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