forked from celeritas-project/celeritas
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ActionRegistryOutput.hh
47 lines (38 loc) · 1.43 KB
/
ActionRegistryOutput.hh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
//----------------------------------*-C++-*----------------------------------//
// Copyright 2022-2024 UT-Battelle, LLC, and other Celeritas developers.
// See the top-level COPYRIGHT file for details.
// SPDX-License-Identifier: (Apache-2.0 OR MIT)
//---------------------------------------------------------------------------//
//! \file celeritas/global/ActionRegistryOutput.hh
//---------------------------------------------------------------------------//
#pragma once
#include <memory>
#include "corecel/io/OutputInterface.hh"
namespace celeritas
{
class ActionRegistry;
//---------------------------------------------------------------------------//
/*!
* Save action manager data.
*/
class ActionRegistryOutput final : public OutputInterface
{
public:
//!@{
//! \name Type aliases
using SPConstActionRegistry = std::shared_ptr<ActionRegistry const>;
//!@}
public:
// Construct from a shared action manager
explicit ActionRegistryOutput(SPConstActionRegistry actions);
//! Category of data to write
Category category() const final { return Category::internal; }
//! Name of the entry inside the category.
std::string_view label() const final { return "actions"; }
// Write output to the given JSON object
void output(JsonPimpl*) const final;
private:
SPConstActionRegistry actions_;
};
//---------------------------------------------------------------------------//
} // namespace celeritas