CbmRoot
Loading...
Searching...
No Matches
cbm::util Namespace Reference

Namespaces

namespace  detail
 
namespace  yaml
 

Classes

class  EnumKeySet
 A subset of some enumeration entries and rule for mapping them to a contiguous integral index. More...
 
class  EnumMap
 A class to define a statical mapper over some type. More...
 
struct  is_all_same
 Checks, if the types in a sequence are all the same. More...
 
struct  is_all_same< T >
 
struct  is_all_same< T, T >
 
struct  is_all_same< T, T, Args... >
 
struct  is_all_same<>
 
struct  is_in_sequence
 Checks at the compile time, if the non-type template parameter is in a sequence of values. More...
 
struct  is_pointer_to
 Checks, if the template argument is a const/non-const pointer of a type. More...
 
struct  is_pointer_to< Class *, Class >
 
struct  is_pointer_to< const Class *, Class >
 
struct  is_std_optional
 Checks, if a value is std::optional. More...
 
struct  is_std_optional< std::optional< T > >
 
class  StructLooper
 An utility, which allows to apply a callable to selected variables of a class in a loop. More...
 

Functions

 CBM_ENUM_DICT (cbm::algo::kfp::ETrackPid, {"Pip", cbm::algo::kfp::ETrackPid::Pip}, {"Pim", cbm::algo::kfp::ETrackPid::Pim}, {"P", cbm::algo::kfp::ETrackPid::P}, {"Pbar", cbm::algo::kfp::ETrackPid::Pbar}, {"Undef", cbm::algo::kfp::ETrackPid::Undef})
 
template<typename T, typename = std::enable_if_t<detail::EnumHasDict_v<T>>>
std::optional< T > FromString (std::string_view str, bool caseSensitive=false)
 
template<typename T, typename = std::enable_if_t<detail::EnumHasDict_v<T>>>
std::string_view ToString (T t)
 

Variables

template<auto... Args>
constexpr bool is_in_sequence_v = is_in_sequence<Args...>::value
 
template<auto... Values>
constexpr bool have_same_type_v = is_all_same<decltype(Values)...>::value
 Checks, if non-type parameter pack has the same type.
 
template<typename T>
constexpr bool is_std_optional_v = is_std_optional<T>::value
 
template<typename T, class Class>
constexpr bool is_pointer_to_v = is_pointer_to<T, Class>::value
 

Function Documentation

◆ CBM_ENUM_DICT()

◆ FromString()

template<typename T, typename = std::enable_if_t<detail::EnumHasDict_v<T>>>
std::optional< T > cbm::util::FromString ( std::string_view str,
bool caseSensitive = false )

◆ ToString()

Variable Documentation

◆ have_same_type_v

template<auto... Values>
bool cbm::util::have_same_type_v = is_all_same<decltype(Values)...>::value
constexpr

Checks, if non-type parameter pack has the same type.

Template Parameters
Values...Values to be tested

Definition at line 55 of file CbmTypeTraits.h.

◆ is_in_sequence_v

template<auto... Args>
bool cbm::util::is_in_sequence_v = is_in_sequence<Args...>::value
constexpr

◆ is_pointer_to_v

template<typename T, class Class>
bool cbm::util::is_pointer_to_v = is_pointer_to<T, Class>::value
constexpr

Definition at line 88 of file CbmTypeTraits.h.

◆ is_std_optional_v

template<typename T>
bool cbm::util::is_std_optional_v = is_std_optional<T>::value
constexpr