Celeritas  0.5.0-56+6b053cd
Public Member Functions | List of all members
celeritas::ConcreteAction Class Reference

Concrete mixin utility class for managing an action. More...

#include <ActionInterface.hh>

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

Public Member Functions

 ConcreteAction (ActionId id, std::string label) noexcept(!CELERITAS_DEBUG)
 Construct a concrete action from a label and ID.
 
 ConcreteAction (ActionId id, std::string label, std::string description) noexcept(!CELERITAS_DEBUG)
 Construct a concrete action from an ID, a unique label, and a description.
 
 ~ConcreteAction () noexcept
 Default destructor.
 
 CELER_DELETE_COPY_MOVE (ConcreteAction)
 
ActionId action_id () const final
 ID of this action for verification.
 
std::string_view label () const final
 Short label.
 
std::string_view description () const final
 Descriptive label.
 
- Public Member Functions inherited from celeritas::ActionInterface
virtual ~ActionInterface () noexcept=0
 Default destructor.
 

Additional Inherited Members

- Protected Member Functions inherited from celeritas::ActionInterface
 ActionInterface ()=default
 
 CELER_DEFAULT_COPY_MOVE (ActionInterface)
 

Detailed Description

Concrete mixin utility class for managing an action.

Example:

class KernellyPhysicsAction final : public CoreStepActionInterface,
{
public:
// Construct with ID and label
void step(CoreParams const&, CoreStateHost&) const final;
void step(CoreParams const&, CoreStateDevice&) const final;
StepActionOrder order() const final { return StepActionOrder::post; }
};
class PlaceholderPhysicsAction final : public ConcreteAction
{
public:
// Construct with ID and label
};
StepActionInterface< CoreParams, CoreState > CoreStepActionInterface
Action interface for core stepping loop.
Definition: celeritas/global/ActionInterface.hh:28
ConcreteAction(ActionId id, std::string label) noexcept(!CELERITAS_DEBUG)
Construct a concrete action from a label and ID.
Definition: ActionInterface.cc:24
StepActionOrder
Within-step ordering of explicit actions.
Definition: corecel/sys/ActionInterface.hh:30

The noexcept declarations improve code generation for the common use case of multiple inheritance.

Note
Use this class when multiple instances of the class may coexist in the same stepping loop.

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