Template Struct TypeSelector

Struct Documentation

template<typename DerivedTypeSelectorT>
struct TypeSelector

Public Types

using TypeId = int
using TypeName = std::string

Public Functions

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

Public Static Functions

static bool isValid(TypeId type_id)
static TypeName toStr(TypeId type_id)
static TypeId toTypeId(const std::string &name)
static std::optional<DerivedTypeSelectorT> from(const std::string &type_name)
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