db::PrefixTag Struct Reference

Marks an item as being a prefix to another tag. More...

#include <DataBoxTag.hpp>

Detailed Description

Marks an item as being a prefix to another tag.


Used to mark a type as being a DataBoxTag where the label is a prefix to the DataBoxTag that is a member type alias tag. A prefix tag must contain a type alias named type with the type of the Tag it is a prefix to, as well as a type alias tag that is the type of the Tag that this prefix tag is a prefix for. A prefix tag must also have a label equal to the name of the struct (tag).

Derived Class Requires:


A PrefixTag tag has the structure:

template <typename Tag>
struct TagPrefix : db::PrefixTag, db::SimpleTag {
using type = typename Tag::type;
using tag = Tag;
static std::string name() noexcept {
return "TagPrefix(" + Tag::name() + ")";

The name used to retrieve a prefix tag from the DataBox is:

CHECK(db::get_item_from_box<double>(original_box, "TagPrefix(Tag0)") == 8.7);
See also
DataBox DataBoxTag tag_name ComputeTag

The documentation for this struct was generated from the following file: