.. _program_listing_file_SeQuant_domain_mbpt_context.hpp: Program Listing for File context.hpp ==================================== |exhale_lsh| :ref:`Return to documentation for file ` (``SeQuant/domain/mbpt/context.hpp``) .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS .. code-block:: cpp #ifndef SEQUANT_DOMAIN_MBPT_CONTEXT_HPP #define SEQUANT_DOMAIN_MBPT_CONTEXT_HPP #include #include namespace sequant::mbpt { enum class CSV { Yes, No }; class Context { public: struct Defaults { constexpr static auto csv = CSV::No; }; explicit Context(CSV csv_formalism = Defaults::csv) noexcept; CSV csv() const { return csv_; } private: CSV csv_ = Defaults::csv; }; bool operator==(Context const& left, Context const& right); bool operator!=(Context const& left, Context const& right); const Context& get_default_mbpt_context(); void set_default_mbpt_context(const Context& ctx); void reset_default_mbpt_context(); [[nodiscard]] detail::ImplicitContextResetter set_scoped_default_mbpt_context(const Context& ctx); } // namespace sequant::mbpt #endif // SEQUANT_DOMAIN_MBPT_CONTEXT_HPP