.. _program_listing_file_src_yields_YieldCommons.hpp: Program Listing for File YieldCommons.hpp ========================================= |exhale_lsh| :ref:`Return to documentation for file ` (``src/yields/YieldCommons.hpp``) .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS .. code-block:: cpp #ifndef YIELDCOMMONS_HPP #define YIELDCOMMONS_HPP #include #include #include #include #include #include namespace yields { enum class Channel { // NOLINTBEGIN(readability-identifier-naming) -- trailing underscore on each enumerator matches this project's own member-variable convention, used here (rather than plain camelBack, this project's actual style for enum constants -- see elem::Symbols's own identical, deliberate deviation) at the user's own explicit request ccsn_, massiveStarWinds_, agb_, nChannel_ // NOLINTEND(readability-identifier-naming) }; constexpr std::array(Channel::nChannel_)> channelStr{ "ccsn", "massive_star_winds", "agb" }; constexpr double defaultMinIsotopeLifetime = 1.0e4; inline static const std::string defaultRegistry = // NOLINT(bugprone-throwing-static-initialization,cert-err58-cpp) -- built from fixed string literals, so the (theoretically throwing) path conversion can never actually throw here (std::filesystem::path("data") / std::filesystem::path("yields") / std::filesystem::path("yields.toml")); struct YieldChannelDescriptor { // NOLINTBEGIN(readability-identifier-naming) -- trailing underscore matches this project's own member-variable convention (see utils::Bracket's identical public-struct-fields-with-trailing-underscore precedent), even though these particular names otherwise match YieldChannel::YieldChannel()'s own parameter names exactly Channel channel_; std::string modelName_; std::optional mMin_; std::optional mMax_; // NOLINTEND(readability-identifier-naming) }; } // namespace yields #endif // YIELDCOMMONS_HPP