VariablesTag.hpp
1 // Distributed under the MIT License.
2 // See LICENSE.txt for details.
3 
4 #pragma once
5 
6 #include <cstddef>
7 #include <string>
8 
9 #include "DataStructures/DataBox/Tag.hpp"
10 #include "DataStructures/DataBox/TagName.hpp"
11 #include "Utilities/TMPL.hpp"
12 #include "Utilities/TypeTraits.hpp"
13 
14 /// \cond
15 template <typename TagsList>
16 class Variables;
17 /// \endcond
18 
19 namespace Tags {
20 template <typename TagsList>
23  "The TagsList passed to Tags::Variables is not a typelist");
24  using tags_list = TagsList;
26  static std::string name() noexcept {
27  std::string tag_name{"Variables("};
28  size_t iter = 0;
29  tmpl::for_each<TagsList>([&tag_name, &iter ](auto tag) noexcept {
30  tag_name += db::tag_name<tmpl::type_from<decltype(tag)>>();
31  if (iter + 1 != tmpl::size<TagsList>::value) {
32  tag_name += ",";
33  }
34  iter++;
35  });
36  return tag_name + ")";
37  }
38 };
39 } // namespace Tags
tt::is_a
Check if type T is a template specialization of U
Definition: IsA.hpp:41
std::string
db::tag_name
std::string tag_name() noexcept
Get the name of a DataBoxTag, including prefixes.
Definition: TagName.hpp:44
Tags::Variables
Definition: VariablesTag.hpp:21
db::SimpleTag
Tags for the DataBox inherit from this type.
Definition: Tag.hpp:23
cstddef
TMPL.hpp
string