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 63 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 64 of file EnumFlags.h.

◆ UMax

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

Definition at line 65 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 98 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 94 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 165 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 217 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 264 of file EnumFlags.h.

◆ getLongestName()

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

Definition at line 247 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 183 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 234 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 106 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 150 of file EnumFlags.h.

◆ hasAll()

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

Definition at line 313 of file EnumFlags.h.

◆ hasNone()

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

Definition at line 301 of file EnumFlags.h.

◆ isContinuous()

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

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

◆ isScoped()

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

Definition at line 68 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 119 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 172 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 209 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 275 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 259 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 75 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 312 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 84 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 231 of file EnumFlags.h.

◆ MarginScan

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

Definition at line 113 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 169 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 167 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 180 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 115 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 114 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 168 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 166 of file EnumFlags.h.

◆ MinScan

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

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

◆ NamesLongest

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

Definition at line 256 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 244 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 300 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 245 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 81 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 164 of file EnumFlags.h.


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