|
||||
File indexing completed on 2025-01-18 09:54:49
0001 //----------------------------------*-C++-*----------------------------------// 0002 // Copyright 2022-2024 UT-Battelle, LLC, and other Celeritas developers. 0003 // See the top-level COPYRIGHT file for details. 0004 // SPDX-License-Identifier: (Apache-2.0 OR MIT) 0005 //---------------------------------------------------------------------------// 0006 //! \file corecel/sys/ActionRegistryOutput.hh 0007 //---------------------------------------------------------------------------// 0008 #pragma once 0009 0010 #include <memory> 0011 0012 #include "corecel/io/OutputInterface.hh" 0013 0014 namespace celeritas 0015 { 0016 class ActionRegistry; 0017 //---------------------------------------------------------------------------// 0018 /*! 0019 * Save action manager data. 0020 */ 0021 class ActionRegistryOutput final : public OutputInterface 0022 { 0023 public: 0024 //!@{ 0025 //! \name Type aliases 0026 using SPConstActionRegistry = std::shared_ptr<ActionRegistry const>; 0027 //!@} 0028 0029 public: 0030 // Construct from a shared action manager 0031 explicit ActionRegistryOutput(SPConstActionRegistry actions); 0032 0033 //! Category of data to write 0034 Category category() const final { return Category::internal; } 0035 0036 //! Name of the entry inside the category. 0037 std::string_view label() const final { return "actions"; } 0038 0039 // Write output to the given JSON object 0040 void output(JsonPimpl*) const final; 0041 0042 private: 0043 SPConstActionRegistry actions_; 0044 }; 0045 0046 //---------------------------------------------------------------------------// 0047 } // namespace celeritas
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |