Classes | Namespaces | Typedefs | Functions | Variables
DataBoxTag.hpp File Reference

Defines classes SimpleTag, PrefixTag, ComputeTag and several functions for retrieving tag info. More...

#include <cstddef>
#include <ostream>
#include <string>
#include "ErrorHandling/Assert.hpp"
#include "Utilities/ConstantExpressions.hpp"
#include "Utilities/NoSuchType.hpp"
#include "Utilities/PrettyType.hpp"
#include "Utilities/Requires.hpp"
#include "Utilities/TMPL.hpp"
#include "Utilities/TypeTraits.hpp"

Go to the source code of this file.

Classes

struct  Tags::DataBox
 Tag used to retrieve the DataBox from the db::get function. More...
 
struct  db::SimpleTag
 Tags for the DataBox inherit from this type. More...
 
struct  db::BaseTag
 Tags that are base tags, i.e. a simple or compute tag must derive off them for them to be useful. More...
 
struct  db::PrefixTag
 Marks an item as being a prefix to another tag. More...
 
struct  db::ComputeTag
 Marks a DataBoxTag as being a compute item that executes a function. More...
 
struct  db::is_compute_item< Tag, typename >
 Check if Tag derives off of db::ComputeTag. More...
 
struct  db::is_non_base_tag< Tag, typename >
 Check if Tag is a non-base DataBox tag. I.e. a SimpleTag or a ComputeTag. More...
 
struct  db::is_tag< Tag, typename >
 Check if Tag is a BaseTag, SimpleTag, or ComputeTag. More...
 
struct  db::is_base_tag< Tag, typename >
 Check if Tag is a base DataBox tag. More...
 
struct  db::has_return_type_member< T, class >
 
struct  db::has_return_type_member< T, cpp17::void_t< typename T::return_type > >
 
struct  db::Subitems< TagList, Tag, typename >
 Struct that can be specialized to allow DataBox items to have subitems. Specializations must define: More...
 

Namespaces

 db
 Namespace for DataBox related things.
 

Typedefs

template<typename Tag , typename TagList = NoSuchType>
using db::item_type = typename DataBox_detail::item_type_impl< TagList, Tag >::type
 Get the type that is returned by the Tag. If it is a base tag then a TagList must be passed as a second argument.
 
template<template< typename... > class Wrapper, typename TagList , typename... Args>
using db::wrap_tags_in = tmpl::transform< TagList, tmpl::bind< Wrapper, tmpl::_1, tmpl::pin< Args >... > >
 Create a new list of Tags by wrapping each tag in TagList using the Wrapper.
 
template<template< typename... > class Prefix, typename Tag , typename... Args>
using db::add_tag_prefix = Prefix< DataBox_detail::dispatch_add_tag_prefix_impl< Prefix, Tag, Args... >, Args... >
 Wrap Tag in Prefix<_, Args...>, also wrapping variables tags if Tag is a Tags::Variables.
 
template<typename Tag >
using db::remove_tag_prefix = typename DataBox_detail::remove_tag_prefix_impl< Tag >::type
 Remove a prefix from Tag, also removing it from the variables tags if the unwrapped tag is a Tags::Variables.
 
template<typename Tag >
using db::remove_all_prefixes = typename DataBox_detail::remove_all_prefixes_impl< Tag, cpp17::is_base_of_v< db::PrefixTag, Tag > >::type
 Completely remove all prefix tags from a Tag.
 
template<typename Tag , typename NewTagsList >
using db::variables_tag_with_tags_list = typename DataBox_detail::variables_tag_with_tags_list_impl< DataBox_detail::tag_type< Tag > >::template f< Tag, NewTagsList >
 Change the tags contained in a possibly prefixed Variables tag. More...
 
template<typename Tag >
using db::get_variables_tags_list = typename DataBox_detail::get_variables_tags_list_impl< DataBox_detail::tag_type< Tag > >::template f< Tag >
 
template<typename Tag , typename TagList = NoSuchType>
using db::split_tag = tmpl::conditional_t< tmpl::size< typename Subitems< TagList, Tag >::type >::value==0, tmpl::list< Tag >, typename Subitems< TagList, Tag >::type >
 Split a tag into its subitems. Tag cannot be a base tag.
 

Functions

template<typename Tag >
std::string db::get_tag_name ()
 Get the name of a DataBoxTag, including prefixes. More...
 

Variables

template<class T >
constexpr bool db::has_return_type_member_v = has_return_type_member<T>::value
 true if T has nested type alias named return_type
 
template<typename Tag >
constexpr bool db::is_compute_item_v = is_compute_item<Tag>::value
 
template<typename Tag >
constexpr bool db::is_non_base_tag_v = is_non_base_tag<Tag>::value
 
template<typename Tag >
constexpr bool db::is_tag_v = is_tag<Tag>::value
 
template<typename Tag >
constexpr bool db::is_base_tag_v = is_base_tag<Tag>::value
 

Detailed Description

Defines classes SimpleTag, PrefixTag, ComputeTag and several functions for retrieving tag info.