SpECTRE Documentation Coverage Report
Current view: top level - IO/Observer - TypeOfObservation.hpp Hit Total Coverage
Commit: a8efe75339f4781ca06d43fed14c40144d5e8a08 Lines: 2 5 40.0 %
Date: 2024-10-17 21:19:21
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 1.14