SpECTRE Documentation Coverage Report
Current view: top level - DataStructures/DataBox - SubitemTag.hpp Hit Total Coverage
Commit: edb1b5199a4a86c269aedbb831767801169f3e8a Lines: 1 6 16.7 %
Date: 2021-04-19 16:23:01
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 "DataStructures/DataBox/Subitems.hpp"
       7             : #include "DataStructures/DataBox/Tag.hpp"
       8             : #include "Utilities/TMPL.hpp"
       9             : 
      10             : namespace Tags {
      11             : 
      12             : /// \cond
      13             : // Declaration of a tag for a subitem
      14             : // Unless specialized, it will be the reference tag below,
      15             : template <typename Tag, typename ParentTag>
      16             : struct Subitem;
      17             : /// \endcond
      18             : 
      19             : /// \brief a reference tag that refers to a particular Tag that is a subitem of
      20             : /// an item tagged with ParentTag
      21             : template <typename Tag, typename ParentTag>
      22           1 : struct Subitem : Tag, db::ReferenceTag {
      23           0 :   using base = Tag;
      24           0 :   using parent_tag = ParentTag;
      25           0 :   static const auto& get(
      26             :       const typename parent_tag::type& parent_value) noexcept {
      27             :     return ::db::Subitems<parent_tag>::template create_compute_item<base>(
      28             :         parent_value);
      29             :   }
      30           0 :   using argument_tags = tmpl::list<parent_tag>;
      31             : };
      32             : }  // namespace Tags

Generated by: LCOV version 1.14