openMSX
|
#include <EnumSetting.hh>
Classes | |
struct | MapEntry |
Public Types | |
using | Map = std::vector< MapEntry > |
Public Member Functions | |
const auto & | getMap () const |
EnumSettingBase (Map &&m) | |
int | fromStringBase (std::string_view str) const |
std::string_view | toStringBase (int value) const |
auto | getPossibleValues () const |
void | additionalInfoBase (TclObject &result) const |
void | tabCompletionBase (std::vector< std::string > &tokens) const |
Definition at line 16 of file EnumSetting.hh.
using openmsx::EnumSettingBase::Map = std::vector<MapEntry> |
Definition at line 27 of file EnumSetting.hh.
|
explicit |
Definition at line 13 of file EnumSetting.cc.
References openmsx::EnumSettingBase::MapEntry::name, and ranges::sort().
void openmsx::EnumSettingBase::additionalInfoBase | ( | TclObject & | result | ) | const |
Definition at line 34 of file EnumSetting.cc.
References openmsx::TclObject::addListElement(), openmsx::TclObject::addListElements(), and getPossibleValues().
Referenced by openmsx::EnumSetting< T >::additionalInfo().
int openmsx::EnumSettingBase::fromStringBase | ( | std::string_view | str | ) | const |
Definition at line 19 of file EnumSetting.cc.
References binary_find(), and openmsx::EnumSettingBase::MapEntry::name.
Referenced by openmsx::EnumSetting< T >::EnumSetting(), and openmsx::EnumSetting< T >::getEnum().
|
inline |
Definition at line 28 of file EnumSetting.hh.
|
inline |
Definition at line 35 of file EnumSetting.hh.
References view::transform().
Referenced by additionalInfoBase(), and tabCompletionBase().
void openmsx::EnumSettingBase::tabCompletionBase | ( | std::vector< std::string > & | tokens | ) | const |
Definition at line 41 of file EnumSetting.cc.
References openmsx::Completer::completeString(), and getPossibleValues().
Referenced by openmsx::EnumSetting< T >::tabCompletion().
std::string_view openmsx::EnumSettingBase::toStringBase | ( | int | value | ) | const |
Definition at line 27 of file EnumSetting.cc.
References ranges::find(), and openmsx::EnumSettingBase::MapEntry::value.