#include <AMReX_String.H>
#include <algorithm>
#include <array>
#include <stdexcept>
#include <string>
#include <string_view>
#include <type_traits>
#include <utility>
#include <vector>
Go to the source code of this file.
|
template<typename T > |
using | amrex_enum_traits = decltype(amrex_get_enum_traits(std::declval< T >())) |
|
|
template<typename T , typename ET = amrex_enum_traits<T>, std::enable_if_t< ET::value, int > = 0> |
std::vector< std::pair< std::string, T > > | amrex::getEnumNameValuePairs () |
|
template<typename T , typename ET = amrex_enum_traits<T>, std::enable_if_t< ET::value, int > = 0> |
T | amrex::getEnum (std::string_view const &s) |
|
template<typename T , typename ET = amrex_enum_traits<T>, std::enable_if_t< ET::value, int > = 0> |
T | amrex::getEnumCaseInsensitive (std::string_view const &s) |
|
template<typename T , typename ET = amrex_enum_traits<T>, std::enable_if_t< ET::value, int > = 0> |
std::string | amrex::getEnumNameString (T const &v) |
|
template<typename T , typename ET = amrex_enum_traits<T>, std::enable_if_t< ET::value, int > = 0> |
std::vector< std::string > | amrex::getEnumNameStrings () |
|
template<typename T , typename ET = amrex_enum_traits<T>, std::enable_if_t< ET::value, int > = 0> |
std::string | amrex::getEnumClassName () |
|
◆ AMREX_ENUM
#define AMREX_ENUM |
( |
|
CLASS, |
|
|
|
... |
|
) |
| |
Value: enum class CLASS :
int { __VA_ARGS__ }; \
struct CLASS##_EnumTraits { \
using enum_class_t = CLASS; \
static constexpr bool value = true; \
static constexpr std::string_view class_name{#CLASS}; \
static constexpr std::string_view enum_names{#__VA_ARGS__}; \
}; \
CLASS##_EnumTraits amrex_get_enum_traits(CLASS)
const int[]
Definition: AMReX_BLProfiler.cpp:1664
◆ amrex_enum_traits