SpECTRE Documentation Coverage Report
Current view: top level - DataStructures/DataBox - Subitems.hpp Coverage Total Hit
Commit: 0d1d717af84a81fb1284a20c4013708fe85cc2f0 Lines: 33.3 % 3 1
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 <cstddef>
       7              : 
       8              : #include "Utilities/TMPL.hpp"
       9              : 
      10              : namespace db {
      11              : /// \ingroup DataBoxGroup
      12              : /// Struct that can be specialized to allow DataBox items to have
      13              : /// subitems.  Specializations must define:
      14              : /// * `using type = tmpl::list<...>` listing the subtags of `Tag`
      15              : /// * A static member function to initialize a subitem of a simple
      16              : ///   item:
      17              : ///   ```
      18              : ///   template <typename Subtag>
      19              : ///   static void create_item(
      20              : ///       const gsl::not_null<typename Tag::type*> parent_value,
      21              : ///       const gsl::not_null<typename Subtag::type*> sub_value);
      22              : ///   ```
      23              : ///   Mutating the subitems must also modify the main item.
      24              : /// * A static member function evaluating a subitem of a compute
      25              : ///   item:
      26              : ///   ```
      27              : ///   template <typename Subtag>
      28              : ///   static typename Subtag::type create_compute_item(
      29              : ///       typename Tag::type& parent_value);
      30              : ///   ```
      31              : template <typename Tag, typename = std::nullptr_t>
      32            1 : struct Subitems {
      33            0 :   using type = tmpl::list<>;
      34              : };
      35              : }  // namespace db
        

Generated by: LCOV version 2.0-1