Project
Loading...
Searching...
No Matches
o2::utils::details::enum_flags::FlagsHelper< E > Struct Template Referencefinal

#include <EnumFlags.h>

Public Types

enum class  SVal : uint8_t { Start , End , AnonStr , AnonStart }
 
enum class  SType : uint8_t {
  Enum_t , Type_t , eT0 , eT1 ,
  eT2 , eT3
}
 
using U = std::underlying_type_t< E >
 

Static Public Member Functions

static constexpr bool isScoped () noexcept
 
template<E e>
static consteval const chartpeek () noexcept
 
template<SVal v, SType t>
static constexpr auto getSpec () noexcept
 
template<E e>
static constexpr bool isValid () noexcept
 
template<size_t... I>
static constexpr auto getValues (std::index_sequence< I... >) noexcept
 
static constexpr auto count () noexcept
 
static constexpr bool isContinuous () noexcept
 
template<E e>
static constexpr std::string_view getName ()
 
static constexpr std::string_view removeScope (std::string_view s)
 
static constexpr std::string_view findScope (std::string_view s)
 
template<bool with_scope, std::size_t... I>
static constexpr auto getNames (std::index_sequence< I... >)
 
static constexpr auto getLongestName () noexcept
 
template<E e>
static constexpr std::string_view toString () noexcept
 
static constexpr std::optional< E > fromString (std::string_view str) noexcept
 
static constexpr unsigned char toLower (const unsigned char c) noexcept
 
static constexpr bool isIEqual (const unsigned char a, const unsigned char b) noexcept
 
static constexpr bool isIEqual (std::string_view s1, std::string_view s2) noexcept
 
static constexpr bool hasNone () noexcept
 
static constexpr bool hasAll () noexcept
 

Static Public Attributes

template<E e>
static constexpr std::string_view tpeek_v {tpeek<e>()}
 
static constexpr auto CSpecifics
 
static constexpr size_t MinScan {0}
 
static constexpr size_t MarginScan {1}
 
static constexpr size_t MaxUnderScan {std::numeric_limits<U>::digits}
 
static constexpr size_t MaxScan {MaxUnderScan + MarginScan}
 
static constexpr auto Values {getValues(std::make_index_sequence<MaxScan - MinScan - MarginScan>())}
 
static constexpr auto Min_v {Values.front()}
 
static constexpr auto Max_v {Values.back()}
 
static constexpr auto Min_u_v {static_cast<size_t>(Min_v)}
 
static constexpr auto Max_u_v {static_cast<size_t>(Max_v)}
 
static constexpr uint64_t MaxRep {(Max_u_v >= 64) ? std::numeric_limits<uint64_t>::max() : (1ULL << Max_u_v) - 1}
 
template<E e>
static constexpr auto getNameValue {getName<e>()}
 
static constexpr auto Names {getNames<false>(std::make_index_sequence<count()>())}
 
static constexpr auto NamesScoped {getNames<true>(std::make_index_sequence<count()>())}
 
static constexpr auto Scope {findScope(NamesScoped.front())}
 
static constexpr auto NamesLongest {getLongestName()}
 
static constexpr std::string_view None {"none"}
 
static constexpr std::string_view All {"all"}
 

Detailed Description

template<EnumFlagHelper E>
struct o2::utils::details::enum_flags::FlagsHelper< E >

Definition at line 58 of file EnumFlags.h.

Member Typedef Documentation

◆ U

template<EnumFlagHelper E>
using o2::utils::details::enum_flags::FlagsHelper< E >::U = std::underlying_type_t<E>

Definition at line 59 of file EnumFlags.h.

Member Enumeration Documentation

◆ SType

template<EnumFlagHelper E>
enum class o2::utils::details::enum_flags::FlagsHelper::SType : uint8_t
strong
Enumerator
Enum_t 
Type_t 
eT0 
eT1 
eT2 
eT3 

Definition at line 91 of file EnumFlags.h.

◆ SVal

template<EnumFlagHelper E>
enum class o2::utils::details::enum_flags::FlagsHelper::SVal : uint8_t
strong
Enumerator
Start 
End 
AnonStr 
AnonStart 

Definition at line 87 of file EnumFlags.h.

Member Function Documentation

◆ count()

template<EnumFlagHelper E>
static constexpr auto o2::utils::details::enum_flags::FlagsHelper< E >::count ( )
inlinestaticconstexprnoexcept

Definition at line 158 of file EnumFlags.h.

◆ findScope()

template<EnumFlagHelper E>
static constexpr std::string_view o2::utils::details::enum_flags::FlagsHelper< E >::findScope ( std::string_view  s)
inlinestaticconstexpr

Definition at line 201 of file EnumFlags.h.

◆ fromString()

template<EnumFlagHelper E>
static constexpr std::optional< E > o2::utils::details::enum_flags::FlagsHelper< E >::fromString ( std::string_view  str)
inlinestaticconstexprnoexcept

Definition at line 248 of file EnumFlags.h.

◆ getLongestName()

template<EnumFlagHelper E>
static constexpr auto o2::utils::details::enum_flags::FlagsHelper< E >::getLongestName ( )
inlinestaticconstexprnoexcept

Definition at line 231 of file EnumFlags.h.

◆ getName()

template<EnumFlagHelper E>
template<E e>
static constexpr std::string_view o2::utils::details::enum_flags::FlagsHelper< E >::getName ( )
inlinestaticconstexpr

Definition at line 167 of file EnumFlags.h.

◆ getNames()

template<EnumFlagHelper E>
template<bool with_scope, std::size_t... I>
static constexpr auto o2::utils::details::enum_flags::FlagsHelper< E >::getNames ( std::index_sequence< I... >  )
inlinestaticconstexpr

Definition at line 218 of file EnumFlags.h.

◆ getSpec()

template<EnumFlagHelper E>
template<SVal v, SType t>
static constexpr auto o2::utils::details::enum_flags::FlagsHelper< E >::getSpec ( )
inlinestaticconstexprnoexcept

Definition at line 99 of file EnumFlags.h.

◆ getValues()

template<EnumFlagHelper E>
template<size_t... I>
static constexpr auto o2::utils::details::enum_flags::FlagsHelper< E >::getValues ( std::index_sequence< I... >  )
inlinestaticconstexprnoexcept

Definition at line 143 of file EnumFlags.h.

◆ hasAll()

template<EnumFlagHelper E>
static constexpr bool o2::utils::details::enum_flags::FlagsHelper< E >::hasAll ( )
inlinestaticconstexprnoexcept

Definition at line 297 of file EnumFlags.h.

◆ hasNone()

template<EnumFlagHelper E>
static constexpr bool o2::utils::details::enum_flags::FlagsHelper< E >::hasNone ( )
inlinestaticconstexprnoexcept

Definition at line 285 of file EnumFlags.h.

◆ isContinuous()

template<EnumFlagHelper E>
static constexpr bool o2::utils::details::enum_flags::FlagsHelper< E >::isContinuous ( )
inlinestaticconstexprnoexcept

Definition at line 163 of file EnumFlags.h.

◆ isIEqual() [1/2]

template<EnumFlagHelper E>
static constexpr bool o2::utils::details::enum_flags::FlagsHelper< E >::isIEqual ( const unsigned char  a,
const unsigned char  b 
)
inlinestaticconstexprnoexcept

Definition at line 265 of file EnumFlags.h.

◆ isIEqual() [2/2]

template<EnumFlagHelper E>
static constexpr bool o2::utils::details::enum_flags::FlagsHelper< E >::isIEqual ( std::string_view  s1,
std::string_view  s2 
)
inlinestaticconstexprnoexcept

Definition at line 271 of file EnumFlags.h.

◆ isScoped()

template<EnumFlagHelper E>
static constexpr bool o2::utils::details::enum_flags::FlagsHelper< E >::isScoped ( )
inlinestaticconstexprnoexcept

Definition at line 61 of file EnumFlags.h.

◆ isValid()

template<EnumFlagHelper E>
template<E e>
static constexpr bool o2::utils::details::enum_flags::FlagsHelper< E >::isValid ( )
inlinestaticconstexprnoexcept

Definition at line 112 of file EnumFlags.h.

◆ removeScope()

template<EnumFlagHelper E>
static constexpr std::string_view o2::utils::details::enum_flags::FlagsHelper< E >::removeScope ( std::string_view  s)
inlinestaticconstexpr

Definition at line 193 of file EnumFlags.h.

◆ toLower()

template<EnumFlagHelper E>
static constexpr unsigned char o2::utils::details::enum_flags::FlagsHelper< E >::toLower ( const unsigned char  c)
inlinestaticconstexprnoexcept

Definition at line 259 of file EnumFlags.h.

◆ toString()

template<EnumFlagHelper E>
template<E e>
static constexpr std::string_view o2::utils::details::enum_flags::FlagsHelper< E >::toString ( )
inlinestaticconstexprnoexcept

Definition at line 243 of file EnumFlags.h.

◆ tpeek()

template<EnumFlagHelper E>
template<E e>
static consteval const char * o2::utils::details::enum_flags::FlagsHelper< E >::tpeek ( )
inlinestaticnoexcept

Definition at line 68 of file EnumFlags.h.

Member Data Documentation

◆ All

template<EnumFlagHelper E>
constexpr std::string_view o2::utils::details::enum_flags::FlagsHelper< E >::All {"all"}
staticconstexpr

Definition at line 296 of file EnumFlags.h.

◆ CSpecifics

template<EnumFlagHelper E>
constexpr auto o2::utils::details::enum_flags::FlagsHelper< E >::CSpecifics
staticconstexpr
Initial value:
{std::to_array<
std::tuple<std::string_view, char, std::string_view, char>>({
{"e = ", ';', "<unnamed>", '<'},
{"T = ", ']', "{anonymous}", '{'},
})}

Definition at line 77 of file EnumFlags.h.

◆ getNameValue

template<EnumFlagHelper E>
template<E e>
constexpr auto o2::utils::details::enum_flags::FlagsHelper< E >::getNameValue {getName<e>()}
staticconstexpr

Definition at line 215 of file EnumFlags.h.

◆ MarginScan

template<EnumFlagHelper E>
constexpr size_t o2::utils::details::enum_flags::FlagsHelper< E >::MarginScan {1}
staticconstexpr

Definition at line 106 of file EnumFlags.h.

◆ Max_u_v

template<EnumFlagHelper E>
constexpr auto o2::utils::details::enum_flags::FlagsHelper< E >::Max_u_v {static_cast<size_t>(Max_v)}
staticconstexpr

Definition at line 162 of file EnumFlags.h.

◆ Max_v

template<EnumFlagHelper E>
constexpr auto o2::utils::details::enum_flags::FlagsHelper< E >::Max_v {Values.back()}
staticconstexpr

Definition at line 160 of file EnumFlags.h.

◆ MaxRep

template<EnumFlagHelper E>
constexpr uint64_t o2::utils::details::enum_flags::FlagsHelper< E >::MaxRep {(Max_u_v >= 64) ? std::numeric_limits<uint64_t>::max() : (1ULL << Max_u_v) - 1}
staticconstexpr

Definition at line 164 of file EnumFlags.h.

◆ MaxScan

template<EnumFlagHelper E>
constexpr size_t o2::utils::details::enum_flags::FlagsHelper< E >::MaxScan {MaxUnderScan + MarginScan}
staticconstexpr

Definition at line 108 of file EnumFlags.h.

◆ MaxUnderScan

template<EnumFlagHelper E>
constexpr size_t o2::utils::details::enum_flags::FlagsHelper< E >::MaxUnderScan {std::numeric_limits<U>::digits}
staticconstexpr

Definition at line 107 of file EnumFlags.h.

◆ Min_u_v

template<EnumFlagHelper E>
constexpr auto o2::utils::details::enum_flags::FlagsHelper< E >::Min_u_v {static_cast<size_t>(Min_v)}
staticconstexpr

Definition at line 161 of file EnumFlags.h.

◆ Min_v

template<EnumFlagHelper E>
constexpr auto o2::utils::details::enum_flags::FlagsHelper< E >::Min_v {Values.front()}
staticconstexpr

Definition at line 159 of file EnumFlags.h.

◆ MinScan

template<EnumFlagHelper E>
constexpr size_t o2::utils::details::enum_flags::FlagsHelper< E >::MinScan {0}
staticconstexpr

Definition at line 105 of file EnumFlags.h.

◆ Names

template<EnumFlagHelper E>
constexpr auto o2::utils::details::enum_flags::FlagsHelper< E >::Names {getNames<false>(std::make_index_sequence<count()>())}
staticconstexpr

Definition at line 227 of file EnumFlags.h.

◆ NamesLongest

template<EnumFlagHelper E>
constexpr auto o2::utils::details::enum_flags::FlagsHelper< E >::NamesLongest {getLongestName()}
staticconstexpr

Definition at line 240 of file EnumFlags.h.

◆ NamesScoped

template<EnumFlagHelper E>
constexpr auto o2::utils::details::enum_flags::FlagsHelper< E >::NamesScoped {getNames<true>(std::make_index_sequence<count()>())}
staticconstexpr

Definition at line 228 of file EnumFlags.h.

◆ None

template<EnumFlagHelper E>
constexpr std::string_view o2::utils::details::enum_flags::FlagsHelper< E >::None {"none"}
staticconstexpr

Definition at line 284 of file EnumFlags.h.

◆ Scope

template<EnumFlagHelper E>
constexpr auto o2::utils::details::enum_flags::FlagsHelper< E >::Scope {findScope(NamesScoped.front())}
staticconstexpr

Definition at line 229 of file EnumFlags.h.

◆ tpeek_v

template<EnumFlagHelper E>
template<E e>
constexpr std::string_view o2::utils::details::enum_flags::FlagsHelper< E >::tpeek_v {tpeek<e>()}
staticconstexpr

Definition at line 74 of file EnumFlags.h.

◆ Values

template<EnumFlagHelper E>
constexpr auto o2::utils::details::enum_flags::FlagsHelper< E >::Values {getValues(std::make_index_sequence<MaxScan - MinScan - MarginScan>())}
staticconstexpr

Definition at line 157 of file EnumFlags.h.


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