|
|
|||
File indexing completed on 2025-12-27 10:47:56
0001 //------------------------------- -*- C++ -*- -------------------------------// 0002 // Copyright Celeritas contributors: see top-level COPYRIGHT file for details 0003 // SPDX-License-Identifier: (Apache-2.0 OR MIT) 0004 //---------------------------------------------------------------------------// 0005 //! \file corecel/sys/ActionRegistryOutput.hh 0006 //---------------------------------------------------------------------------// 0007 #pragma once 0008 0009 #include <memory> 0010 0011 #include "corecel/io/OutputInterface.hh" 0012 0013 namespace celeritas 0014 { 0015 class ActionRegistry; 0016 //---------------------------------------------------------------------------// 0017 /*! 0018 * Save action manager data. 0019 */ 0020 class ActionRegistryOutput final : public OutputInterface 0021 { 0022 public: 0023 //!@{ 0024 //! \name Type aliases 0025 using SPConstActionRegistry = std::shared_ptr<ActionRegistry const>; 0026 //!@} 0027 0028 public: 0029 // Construct from a shared action manager 0030 explicit ActionRegistryOutput(SPConstActionRegistry actions); 0031 0032 // Construct from a shared action manager and label 0033 explicit ActionRegistryOutput(SPConstActionRegistry, std::string); 0034 0035 //! Category of data to write 0036 Category category() const final { return Category::internal; } 0037 0038 //! Name of the entry inside the category. 0039 std::string_view label() const final { return label_; } 0040 0041 // Write output to the given JSON object 0042 void output(JsonPimpl*) const final; 0043 0044 private: 0045 SPConstActionRegistry actions_; 0046 std::string label_; 0047 }; 0048 0049 //---------------------------------------------------------------------------// 0050 } // 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 |
|