openMSX
Classes | Public Types | Public Member Functions | List of all members
openmsx::EnumSettingBase Class Reference

#include <EnumSetting.hh>

Inheritance diagram for openmsx::EnumSettingBase:
Inheritance graph
[legend]

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
 

Detailed Description

Definition at line 16 of file EnumSetting.hh.

Member Typedef Documentation

◆ Map

Definition at line 27 of file EnumSetting.hh.

Constructor & Destructor Documentation

◆ EnumSettingBase()

openmsx::EnumSettingBase::EnumSettingBase ( Map &&  m)
explicit

Definition at line 13 of file EnumSetting.cc.

References openmsx::EnumSettingBase::MapEntry::name, and ranges::sort().

Member Function Documentation

◆ additionalInfoBase()

void openmsx::EnumSettingBase::additionalInfoBase ( TclObject result) const

◆ fromStringBase()

int openmsx::EnumSettingBase::fromStringBase ( std::string_view  str) const

◆ getMap()

const auto & openmsx::EnumSettingBase::getMap ( ) const
inline

Definition at line 28 of file EnumSetting.hh.

◆ getPossibleValues()

auto openmsx::EnumSettingBase::getPossibleValues ( ) const
inline

Definition at line 35 of file EnumSetting.hh.

References view::transform().

Referenced by additionalInfoBase(), and tabCompletionBase().

◆ tabCompletionBase()

void openmsx::EnumSettingBase::tabCompletionBase ( std::vector< std::string > &  tokens) const

◆ toStringBase()

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.


The documentation for this class was generated from the following files: