Template Struct TypeSelector

Struct Documentation

template<typename DerivedTypeSelectorT>
struct TypeSelector

Public Types

using TypeId = int
using TypeName = std::string

Public Functions

inline explicit TypeSelector(const TypeName &type_name)
inline TypeSelector(TypeId type_id)
inline ~TypeSelector()
inline explicit operator TypeName() const
inline explicit operator TypeId() const
inline TypeName toStr() const
inline TypeId toTypeId() const
inline bool isValid() const

Public Static Functions

static inline TypeName typeIdToStr(TypeId type_id)
static TypeId strToTypeId(const std::string &name)
static inline bool isValidTypeId(TypeId type_id)
static std::optional<DerivedTypeSelectorT> from(const param::Value &params)
static std::optional<DerivedTypeSelectorT> from(const param::Value &params, const std::string &subconfig_name)

Public Static Attributes

static constexpr TypeId kInvalidTypeId = -1

Friends

inline friend bool operator==(const DerivedTypeSelectorT &lhs, const DerivedTypeSelectorT &rhs)
inline friend bool operator!=(const DerivedTypeSelectorT &lhs, const DerivedTypeSelectorT &rhs)