Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-30 10:17:09

0001 //----------------------------------*-C++-*----------------------------------//
0002 // Copyright 2023-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 orange/detail/OrangeInputIOImpl.json.hh
0007 //---------------------------------------------------------------------------//
0008 #pragma once
0009 
0010 #include <string>
0011 #include <vector>
0012 #include <nlohmann/json.hpp>
0013 
0014 #include "../OrangeTypes.hh"
0015 #include "../surf/VariantSurface.hh"
0016 #include "../transform/VariantTransform.hh"
0017 
0018 namespace celeritas
0019 {
0020 namespace detail
0021 {
0022 //---------------------------------------------------------------------------//
0023 // Read a transform from a JSON object
0024 VariantTransform import_transform(nlohmann::json const& src);
0025 
0026 // Write a transform to arrays suitable for JSON export.
0027 nlohmann::json export_transform(VariantTransform const& t);
0028 
0029 // Read surface data from a JSON object
0030 std::vector<VariantSurface> import_zipped_surfaces(nlohmann::json const& j);
0031 
0032 // Write surface data to a JSON object
0033 nlohmann::json export_zipped_surfaces(std::vector<VariantSurface> const& s);
0034 
0035 // Build a logic definition from a C string.
0036 std::vector<logic_int> string_to_logic(std::string const& s);
0037 
0038 // Convert a logic vector to a string
0039 std::string logic_to_string(std::vector<logic_int> const&);
0040 
0041 //---------------------------------------------------------------------------//
0042 }  // namespace detail
0043 }  // namespace celeritas