SpECTRE Documentation Coverage Report
Current view: top level - IO/Observer - TypeOfObservation.hpp Coverage Total Hit
Commit: 0d1d717af84a81fb1284a20c4013708fe85cc2f0 Lines: 40.0 % 5 2
Test Date: 2026-10-22 17:29:42
Legend: Lines:     hit not hit

            Line data    Source code
       1            0 : // Distributed under the MIT License.
       2              : // See LICENSE.txt for details.
       3              : 
       4              : #pragma once
       5              : 
       6              : #include <iosfwd>
       7              : 
       8              : #include "Utilities/TypeTraits.hpp"
       9              : 
      10              : namespace observers {
      11              : /*!
      12              :  * \ingroup ObserversGroup
      13              :  * \brief Specifies the type of observation.
      14              :  *
      15              :  * Below `sender` is the component passing the data, reduction or volume, to the
      16              :  * observer component.
      17              :  */
      18            1 : enum class TypeOfObservation {
      19              :   /// The sender will only perform reduction observations
      20              :   Reduction,
      21              :   /// The sender will only perform volume observations
      22              :   Volume,
      23              : };
      24              : 
      25            0 : std::ostream& operator<<(std::ostream& os, const TypeOfObservation& t);
      26              : 
      27              : /// @{
      28              : /// Inherits off of `std::true_type` if `T` has a member variable
      29              : /// `RegisterWithObserver`
      30              : template <class T, class = std::void_t<>>
      31            1 : struct has_register_with_observer : std::false_type {};
      32              : 
      33              : /// \cond
      34              : template <class T>
      35              : struct has_register_with_observer<
      36              :     T, std::void_t<decltype(T::RegisterWithObserver)>> : std::true_type {};
      37              : /// \endcond
      38              : 
      39              : template <class T>
      40            0 : constexpr bool has_register_with_observer_v =
      41              :     has_register_with_observer<T>::value;
      42              : /// @}
      43              : }  // namespace observers
        

Generated by: LCOV version 2.0-1