TestTags.hpp
1 // Distributed under the MIT License.
2 // See LICENSE.txt for details.
3 
4 #pragma once
5 
6 #include <string>
7 
8 #include "DataStructures/DataBox/Tag.hpp"
9 #include "DataStructures/DataBox/TagName.hpp"
10 #include "Utilities/Gsl.hpp"
11 #include "Utilities/TMPL.hpp"
12 
13 namespace TestHelpers {
14 
15 struct SomeType;
16 
17 void do_something(gsl::not_null<SomeType*> /* return_value */);
18 
19 namespace db {
20 namespace Tags {
21 
22 struct Bad {};
23 
25  using type = SomeType;
26 };
27 
28 struct Base : ::db::BaseTag {};
29 
31  using type = SomeType;
32 };
33 
35  using base = Simple;
36  using return_type = SomeType;
37  using argument_tags = tmpl::list<>;
38  static constexpr auto function = do_something;
39 };
40 
42  using base = SimpleWithBase;
43  using return_type = SomeType;
44  using argument_tags = tmpl::list<>;
45  static constexpr auto function = do_something;
46 };
47 
48 template <typename Tag>
50  using tag = Tag;
51  using type = SomeType;
52 };
53 
54 
55 } // namespace Tags
56 } // namespace db
57 } // namespace TestHelpers
db::ComputeTag
Mark a struct as a compute tag by inheriting from this.
Definition: Tag.hpp:157
db::PrefixTag
Mark a struct as a prefix tag by inheriting from this.
Definition: Tag.hpp:103
TestHelpers::db::Tags::SimpleWithBaseCompute
Definition: TestTags.hpp:41
db::SimpleTag
Mark a struct as a simple tag by inheriting from this.
Definition: Tag.hpp:36
TestHelpers::db::Tags::Bad
Definition: TestTags.hpp:22
TestHelpers::db::Tags::SimpleWithBase
Definition: TestTags.hpp:30
TestHelpers::db::Tags::SimpleCompute
Definition: TestTags.hpp:34
db::BaseTag
Mark a (usually) empty struct as a base tag by inheriting from this.
Definition: Tag.hpp:69
TestHelpers::db::Tags::Simple
Definition: TestTags.hpp:24
Gsl.hpp
TestHelpers::db::Tags::Label
Definition: TestTags.hpp:49
TMPL.hpp
TestHelpers::db::Tags::Base
Definition: TestTags.hpp:28
db
Namespace for DataBox related things.
Definition: DataBox.hpp:43
gsl::not_null
Require a pointer to not be a nullptr
Definition: ReadSpecThirdOrderPiecewisePolynomial.hpp:13
string