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 >
 
using UMax = uint64_t
 

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
 
static constexpr UMax makeMaxRep (size_t min, size_t max)
 
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, 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 auto MaxRep {makeMaxRep(Min_u_v, Max_u_v)}
 
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.

◆ UMax

template<EnumFlagHelper E>
using o2::utils::details::enum_flags::FlagsHelper< E >::UMax = uint64_t

Definition at line 60 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 92 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 88 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 159 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 211 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 258 of file EnumFlags.h.

◆ getLongestName()

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

Definition at line 241 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 177 of file EnumFlags.h.

◆ getNames()

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

Definition at line 228 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 100 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 144 of file EnumFlags.h.

◆ hasAll()

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

Definition at line 307 of file EnumFlags.h.

◆ hasNone()

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

Definition at line 295 of file EnumFlags.h.

◆ isContinuous()

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

Definition at line 165 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 275 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 281 of file EnumFlags.h.

◆ isScoped()

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

Definition at line 62 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 113 of file EnumFlags.h.

◆ makeMaxRep()

template<EnumFlagHelper E>
static constexpr UMax o2::utils::details::enum_flags::FlagsHelper< E >::makeMaxRep ( size_t  min,
size_t  max 
)
inlinestaticconstexpr

Definition at line 166 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 203 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 269 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 253 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 69 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 306 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 78 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 225 of file EnumFlags.h.

◆ MarginScan

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

Definition at line 107 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 163 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 161 of file EnumFlags.h.

◆ MaxRep

template<EnumFlagHelper E>
constexpr auto o2::utils::details::enum_flags::FlagsHelper< E >::MaxRep {makeMaxRep(Min_u_v, Max_u_v)}
staticconstexpr

Definition at line 174 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 109 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 108 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 162 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 160 of file EnumFlags.h.

◆ MinScan

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

Definition at line 106 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 237 of file EnumFlags.h.

◆ NamesLongest

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

Definition at line 250 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 238 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 294 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 239 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 75 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 158 of file EnumFlags.h.


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