CbmRoot
Loading...
Searching...
No Matches
cbm::algo::detail Namespace Reference

Classes

struct  EnumHasDict
 
struct  Exception
 Base class for exceptions. More...
 
struct  MSData
 Collection of MS data to unpack. More...
 
struct  UnpackMonitorBase
 

Typedefs

template<typename U , typename T >
using EnableOnConst = std::enable_if_t<std::is_const_v<T> && std::is_same_v<U, std::remove_cv_t<T>>>
 
template<typename U , typename T >
using EnableOnNonConst = std::enable_if_t<!std::is_const_v<T> && std::is_same_v<U, std::remove_cv_t<T>>>
 
template<typename T >
using EnumDict_t = std::vector<std::pair<std::string_view, T>>
 

Functions

template<typename T , typename = std::enable_if_t<detail::EnumHasDict_v<T>>>
std::vector< std::string_view > ValidEntries ()
 
void RaiseUnknownEntry (std::string_view str, const std::vector< std::string_view > &validEntries)
 

Variables

template<typename T >
const EnumDict_t< T > EnumDict
 
template<typename T >
constexpr bool EnumHasDict_v = EnumHasDict<T>::value
 

Typedef Documentation

◆ EnableOnConst

template<typename U , typename T >
using cbm::algo::detail::EnableOnConst = std::enable_if_t<std::is_const_v<T> && std::is_same_v<U, std::remove_cv_t<T>>>

Definition at line 23 of file PartitionedSpan.h.

◆ EnableOnNonConst

template<typename U , typename T >
using cbm::algo::detail::EnableOnNonConst = std::enable_if_t<!std::is_const_v<T> && std::is_same_v<U, std::remove_cv_t<T>>>

Definition at line 26 of file PartitionedSpan.h.

◆ EnumDict_t

template<typename T >
using cbm::algo::detail::EnumDict_t = std::vector<std::pair<std::string_view, T>>

Definition at line 24 of file EnumDict.h.

Function Documentation

◆ RaiseUnknownEntry()

void cbm::algo::detail::RaiseUnknownEntry ( std::string_view str,
const std::vector< std::string_view > & validEntries )

Definition at line 8 of file EnumDict.cxx.

Referenced by std::operator>>().

◆ ValidEntries()

template<typename T , typename = std::enable_if_t<detail::EnumHasDict_v<T>>>
std::vector< std::string_view > cbm::algo::detail::ValidEntries ( )

Definition at line 37 of file EnumDict.h.

References EnumDict.

Referenced by std::operator>>().

Variable Documentation

◆ EnumDict

template<typename T >
const EnumDict_t<T> cbm::algo::detail::EnumDict
inline

Definition at line 27 of file EnumDict.h.

Referenced by cbm::algo::FromString(), cbm::algo::ToString(), and ValidEntries().

◆ EnumHasDict_v

template<typename T >
bool cbm::algo::detail::EnumHasDict_v = EnumHasDict<T>::value
inlineconstexpr

Definition at line 34 of file EnumDict.h.

Referenced by cbm::algo::yaml::Read().