NebulaStream  0.6.213
NebulaStream is a data and application management framework for the internet of things
magic_enum Namespace Reference

Namespaces

 bitwise_operators
 
 customize
 
 detail
 
 iostream_operators
 
 istream_operators
 
 ostream_operators
 

Classes

struct  is_unscoped_enum
 
struct  is_scoped_enum
 
struct  underlying_type
 

Typedefs

template<typename T >
using Enum = detail::enum_concept< T >
 
template<typename T >
using underlying_type_t = typename underlying_type< T >::type
 
template<auto V>
using enum_constant = detail::enum_constant< V >
 

Functions

template<typename E >
constexpr auto enum_type_name () noexcept -> detail::enable_if_t< E, string_view >
 
template<typename E >
constexpr auto enum_count () noexcept -> detail::enable_if_t< E, std::size_t >
 
template<typename E >
constexpr auto enum_value (std::size_t index) noexcept -> detail::enable_if_t< E, std::decay_t< E >>
 
template<typename E , std::size_t I>
constexpr auto enum_value () noexcept -> detail::enable_if_t< E, std::decay_t< E >>
 
template<typename E >
constexpr auto enum_values () noexcept -> detail::enable_if_t< E, detail::values_t< E >>
 
template<typename E >
constexpr auto enum_integer (E value) noexcept -> detail::enable_if_t< E, underlying_type_t< E >>
 
template<typename E >
constexpr auto enum_underlying (E value) noexcept -> detail::enable_if_t< E, underlying_type_t< E >>
 
template<typename E >
constexpr auto enum_index (E value) noexcept -> detail::enable_if_t< E, optional< std::size_t >>
 
template<auto V>
constexpr auto enum_index () noexcept -> detail::enable_if_t< decltype(V), std::size_t >
 
template<auto V>
constexpr auto enum_name () noexcept -> detail::enable_if_t< decltype(V), string_view >
 
template<typename E , detail::value_type VT = detail::value_type::default_value>
constexpr auto enum_name (E value) noexcept -> detail::enable_if_default_t< E, string_view, VT >
 
template<typename E , detail::value_type VT>
auto enum_name (E value) -> detail::enable_if_flags_t< E, string, VT >
 
template<typename E >
auto enum_flags_name (E value) -> detail::enable_if_t< E, string >
 
template<typename E >
constexpr auto enum_names () noexcept -> detail::enable_if_t< E, detail::names_t< E >>
 
template<typename E >
constexpr auto enum_entries () noexcept -> detail::enable_if_t< E, detail::entries_t< E >>
 
template<typename E , detail::value_type VT = detail::value_type::default_value>
constexpr auto enum_cast (underlying_type_t< E > value) noexcept -> detail::enable_if_t< E, optional< std::decay_t< E >>>
 
template<typename E >
constexpr auto enum_flags_cast (underlying_type_t< E > value) noexcept -> detail::enable_if_t< E, optional< std::decay_t< E >>>
 
template<typename E , detail::value_type VT = detail::value_type::default_value, typename BinaryPredicate = std::equal_to<>>
constexpr auto enum_cast (string_view value, [[maybe_unused]] BinaryPredicate p={}) noexcept(detail::is_nothrow_invocable< BinaryPredicate >()) -> detail::enable_if_t< E, optional< std::decay_t< E >>, BinaryPredicate >
 
template<typename E , typename BinaryPredicate = std::equal_to<>>
constexpr auto enum_flags_cast (string_view value, [[maybe_unused]] BinaryPredicate p={}) noexcept(detail::is_nothrow_invocable< BinaryPredicate >()) -> detail::enable_if_t< E, optional< std::decay_t< E >>, BinaryPredicate >
 
template<typename E , detail::value_type VT = detail::value_type::default_value>
constexpr auto enum_contains (E value) noexcept -> detail::enable_if_t< E, bool >
 
template<typename E >
constexpr auto enum_flags_contains (E value) noexcept -> detail::enable_if_t< E, bool >
 
template<typename E , detail::value_type VT = detail::value_type::default_value>
constexpr auto enum_contains (underlying_type_t< E > value) noexcept -> detail::enable_if_t< E, bool >
 
template<typename E >
constexpr auto enum_flags_contains (underlying_type_t< E > value) noexcept -> detail::enable_if_t< E, bool >
 
template<typename E , detail::value_type VT = detail::value_type::default_value, typename BinaryPredicate = std::equal_to<>>
constexpr auto enum_contains (string_view value, BinaryPredicate p={}) noexcept(detail::is_nothrow_invocable< BinaryPredicate >()) -> detail::enable_if_t< E, bool, BinaryPredicate >
 
template<typename E , typename BinaryPredicate = std::equal_to<>>
constexpr auto enum_flags_contains (string_view value, BinaryPredicate p={}) noexcept(detail::is_nothrow_invocable< BinaryPredicate >()) -> detail::enable_if_t< E, bool, BinaryPredicate >
 
template<typename E , typename F , detail::enable_if_t< E, int > = 0>
constexpr auto enum_for_each (F &&f)
 
template<typename... Es>
constexpr auto enum_fuse (Es... values) noexcept
 
template<typename Result = detail::default_result_type, typename E , typename F , typename R = detail::result_t<E, Result, F>>
constexpr decltype(auto) enum_switch (F &&f, E value)
 
template<typename Result , typename E , typename F , typename R = detail::result_t<E, Result, F>>
constexpr decltype(auto) enum_switch (F &&f, E value, Result &&result)
 

Variables

constexpr bool is_magic_enum_supported = detail::supported<void>::value
 
constexpr auto case_insensitive = detail::case_insensitive{}
 
template<bool AsFlags = true>
constexpr auto as_flags = AsFlags ? detail::value_type::flags_value : detail::value_type::default_value
 

Typedef Documentation

◆ Enum

template<typename T >
using magic_enum::Enum = typedef detail::enum_concept<T>

◆ enum_constant

template<auto V>
using magic_enum::enum_constant = typedef detail::enum_constant<V>

◆ underlying_type_t

template<typename T >
using magic_enum::underlying_type_t = typedef typename underlying_type<T>::type

Function Documentation

◆ enum_cast() [1/2]

template<typename E , detail::value_type VT = detail::value_type::default_value, typename BinaryPredicate = std::equal_to<>>
constexpr auto magic_enum::enum_cast ( string_view  value,
[[maybe_unused] ] BinaryPredicate  p = {} 
) -> detail::enable_if_t<E, optional<std::decay_t<E>>, BinaryPredicate>
constexprnoexcept

◆ enum_cast() [2/2]

template<typename E , detail::value_type VT = detail::value_type::default_value>
constexpr auto magic_enum::enum_cast ( underlying_type_t< E >  value) -> detail::enable_if_t<E, optional<std::decay_t<E>>>
constexprnoexcept

References magic_enum::detail::default_result_type_lambda, magic_enum::detail::flags_value, and magic_enum::detail::value().

Referenced by magic_enum::istream_operators::operator>>().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ enum_contains() [1/3]

template<typename E , detail::value_type VT = detail::value_type::default_value>
constexpr auto magic_enum::enum_contains ( value) -> detail::enable_if_t<E, bool>
constexprnoexcept

References magic_enum::detail::value().

Here is the call graph for this function:

◆ enum_contains() [2/3]

template<typename E , detail::value_type VT = detail::value_type::default_value, typename BinaryPredicate = std::equal_to<>>
constexpr auto magic_enum::enum_contains ( string_view  value,
BinaryPredicate  p = {} 
) -> detail::enable_if_t<E, bool, BinaryPredicate>
constexprnoexcept

◆ enum_contains() [3/3]

template<typename E , detail::value_type VT = detail::value_type::default_value>
constexpr auto magic_enum::enum_contains ( underlying_type_t< E >  value) -> detail::enable_if_t<E, bool>
constexprnoexcept

References magic_enum::detail::value().

Here is the call graph for this function:

◆ enum_count()

template<typename E >
constexpr auto magic_enum::enum_count ( ) -> detail::enable_if_t<E, std::size_t>
constexprnoexcept

Referenced by enum_fuse().

Here is the caller graph for this function:

◆ enum_entries()

template<typename E >
constexpr auto magic_enum::enum_entries ( ) -> detail::enable_if_t<E, detail::entries_t<E>>
constexprnoexcept

◆ enum_flags_cast() [1/2]

template<typename E , typename BinaryPredicate = std::equal_to<>>
constexpr auto magic_enum::enum_flags_cast ( string_view  value,
[[maybe_unused] ] BinaryPredicate  p = {} 
) -> detail::enable_if_t<E, optional<std::decay_t<E>>, BinaryPredicate>
constexprnoexcept

◆ enum_flags_cast() [2/2]

template<typename E >
constexpr auto magic_enum::enum_flags_cast ( underlying_type_t< E >  value) -> detail::enable_if_t<E, optional<std::decay_t<E>>>
constexprnoexcept

References magic_enum::detail::value().

Here is the call graph for this function:

◆ enum_flags_contains() [1/3]

template<typename E >
constexpr auto magic_enum::enum_flags_contains ( value) -> detail::enable_if_t<E, bool>
constexprnoexcept

References magic_enum::detail::value().

Here is the call graph for this function:

◆ enum_flags_contains() [2/3]

template<typename E , typename BinaryPredicate = std::equal_to<>>
constexpr auto magic_enum::enum_flags_contains ( string_view  value,
BinaryPredicate  p = {} 
) -> detail::enable_if_t<E, bool, BinaryPredicate>
constexprnoexcept

◆ enum_flags_contains() [3/3]

template<typename E >
constexpr auto magic_enum::enum_flags_contains ( underlying_type_t< E >  value) -> detail::enable_if_t<E, bool>
constexprnoexcept

References magic_enum::detail::value().

Here is the call graph for this function:

◆ enum_flags_name()

template<typename E >
auto magic_enum::enum_flags_name ( value) -> detail::enable_if_t<E, string>

References magic_enum::detail::value().

Here is the call graph for this function:

◆ enum_for_each()

template<typename E , typename F , detail::enable_if_t< E, int > = 0>
constexpr auto magic_enum::enum_for_each ( F &&  f)
constexpr

◆ enum_fuse()

template<typename... Es>
constexpr auto magic_enum::enum_fuse ( Es...  values)
constexprnoexcept

References enum_count(), magic_enum::detail::is_enum_v, magic_enum::detail::log2(), and magic_enum::detail::values().

Here is the call graph for this function:

◆ enum_index() [1/2]

template<auto V>
constexpr auto magic_enum::enum_index ( ) -> detail::enable_if_t<decltype(V), std::size_t>
constexprnoexcept

References enum_index(), and index.

Here is the call graph for this function:

◆ enum_index() [2/2]

template<typename E >
constexpr auto magic_enum::enum_index ( value) -> detail::enable_if_t<E, optional<std::size_t>>
constexprnoexcept

References index, and magic_enum::detail::value().

Referenced by enum_index(), and magic_enum::detail::fuse_one_enum().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ enum_integer()

template<typename E >
constexpr auto magic_enum::enum_integer ( value) -> detail::enable_if_t<E, underlying_type_t<E>>
constexprnoexcept

References magic_enum::detail::value().

Referenced by NES::WorkerRPCClient::registerMonitoringPlan(), NES::Util::Subprocess::Subprocess(), and NES::Runtime::detail::MemorySegment::~MemorySegment().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ enum_name() [1/3]

template<auto V>
constexpr auto magic_enum::enum_name ( ) -> detail::enable_if_t<decltype(V), string_view>
constexprnoexcept

References magic_enum::detail::enum_name_v.

Referenced by NES::Runtime::AbstractQueryManager::addFailureEndOfStream(), NES::Runtime::AbstractQueryManager::addHardEndOfStream(), NES::Monitoring::AllEntriesMetricStore::addMetrics(), NES::Monitoring::LatestEntriesMetricStore::addMetrics(), NES::Monitoring::MonitoringManager::addMonitoringData(), NES::Monitoring::MonitoringAgent::addMonitoringStreams(), NES::Runtime::AbstractQueryManager::addSoftEndOfStream(), NES::BenchmarkSource::BenchmarkSource(), NES::TestUtils::checkFailedOrTimeout(), NES::TestUtils::checkStoppedOrTimeout(), NES::DataSource::close(), NES::Monitoring::MetricUtils::createCollectorFromCollectorType(), NES::Monitoring::MetricUtils::createCollectorTypeFromMetricType(), NES::Monitoring::MetricUtils::createMetricFromCollectorType(), NES::QueryStateSerializationUtil::deserializeQueryState(), NES::Optimizer::PlacementAmendmentInstance::execute(), NES::RequestProcessor::ExplainRequest::executeRequestLogic(), NES::Statistic::StatisticIdsExtractor::extractStatisticIdsFromQueryId(), fmt::formatter< NES::Runtime::Execution::ExecutablePipelineStage >::format(), std::formatter< E, std::enable_if_t< std::is_enum_v< E > &&magic_enum::customize::enum_format_enabled< E >(), char > >::format(), NES::getLogName(), NES::Monitoring::MonitoringCatalog::getMetricCollector(), NES::Monitoring::MonitoringAgent::getMetricsAsJson(), NES::Client::RemoteClient::getQueries(), NES::Monitoring::MetricUtils::getSchemaFromCollectorType(), NES::Runtime::MemoryLayouts::INSTANTIATE_TEST_CASE_P(), NES::Runtime::Execution::INSTANTIATE_TEST_CASE_P(), NES::INSTANTIATE_TEST_CASE_P(), INSTANTIATE_TEST_CASE_P(), NES::MetricValidator::isValidAll(), NES::LambdaSource::LambdaSource(), NES::MemorySource::MemorySource(), NES::Monitoring::MonitoringManager::MonitoringManager(), NES::Runtime::Execution::ExecutableQueryPlan::notifySourceCompletion(), NES::Runtime::AbstractQueryManager::propagateReconfigurationMarker(), NES::Network::NetworkSource::reconfigure(), NES::Monitoring::MonitoringManager::registerLogicalMonitoringStreams(), NES::MonitoringQueriesTest::runMetricsQueryTest(), NES::TestUtils::sourceType(), NES::Monitoring::MonitoringManager::startOrRedeployMonitoringQuery(), NES::Runtime::AbstractQueryManager::stopExecutableQueryPlan(), NES::Client::RemoteClient::submitQuery(), NES::TEST_F(), NES::Monitoring::MetricUtils::toJson(), NES::MonitoringSink::toString(), NES::Monitoring::toString(), and NES::TestUtils::waitForQueryToStart().

Here is the caller graph for this function:

◆ enum_name() [2/3]

template<typename E , detail::value_type VT>
auto magic_enum::enum_name ( value) -> detail::enable_if_flags_t<E, string, VT>

References magic_enum::detail::n(), and magic_enum::detail::value().

Here is the call graph for this function:

◆ enum_name() [3/3]

template<typename E , detail::value_type VT = detail::value_type::default_value>
constexpr auto magic_enum::enum_name ( value) -> detail::enable_if_default_t<E, string_view, VT>
constexprnoexcept

References magic_enum::detail::value().

Here is the call graph for this function:

◆ enum_names()

template<typename E >
constexpr auto magic_enum::enum_names ( ) -> detail::enable_if_t<E, detail::names_t<E>>
constexprnoexcept

◆ enum_switch() [1/2]

template<typename Result = detail::default_result_type, typename E , typename F , typename R = detail::result_t<E, Result, F>>
constexpr decltype(auto) magic_enum::enum_switch ( F &&  f,
value 
)
constexpr

References magic_enum::detail::value().

Here is the call graph for this function:

◆ enum_switch() [2/2]

template<typename Result , typename E , typename F , typename R = detail::result_t<E, Result, F>>
constexpr decltype(auto) magic_enum::enum_switch ( F &&  f,
value,
Result &&  result 
)
constexpr

References magic_enum::detail::value().

Here is the call graph for this function:

◆ enum_type_name()

template<typename E >
constexpr auto magic_enum::enum_type_name ( ) -> detail::enable_if_t<E, string_view>
constexprnoexcept

◆ enum_underlying()

template<typename E >
constexpr auto magic_enum::enum_underlying ( value) -> detail::enable_if_t<E, underlying_type_t<E>>
constexprnoexcept

References magic_enum::detail::value().

Here is the call graph for this function:

◆ enum_value() [1/2]

template<typename E , std::size_t I>
constexpr auto magic_enum::enum_value ( ) -> detail::enable_if_t<E, std::decay_t<E>>
constexprnoexcept

◆ enum_value() [2/2]

template<typename E >
constexpr auto magic_enum::enum_value ( std::size_t  index) -> detail::enable_if_t<E, std::decay_t<E>>
constexprnoexcept

References index, and magic_enum::detail::log2().

Here is the call graph for this function:

◆ enum_values()

template<typename E >
constexpr auto magic_enum::enum_values ( ) -> detail::enable_if_t<E, detail::values_t<E>>
constexprnoexcept

Variable Documentation

◆ as_flags

◆ case_insensitive

constexpr auto magic_enum::case_insensitive = detail::case_insensitive{}
inlineconstexpr

◆ is_magic_enum_supported

constexpr bool magic_enum::is_magic_enum_supported = detail::supported<void>::value
inlineconstexpr