openMSX
Public Types | Public Member Functions | List of all members
openmsx::EnumSetting< T > Class Template Reference

#include <EnumSetting.hh>

Inheritance diagram for openmsx::EnumSetting< T >:
Inheritance graph
[legend]

Public Types

using Map = std::vector< std::pair< std::string, T > >
 

Public Member Functions

 EnumSetting (CommandController &commandController, std::string_view name, std::string_view description, T initialValue, Map &&map_, SaveSetting save=SAVE)
 
std::string_view getTypeString () const override
 
void additionalInfo (TclObject &result) const override
 
void tabCompletion (std::vector< std::string > &tokens) const override
 
getEnum () const noexcept
 
void setEnum (T e)
 
std::string_view getString () const
 
bool getEnum () const noexcept
 

Detailed Description

template<typename T>
class openmsx::EnumSetting< T >

Definition at line 32 of file EnumSetting.hh.

Member Typedef Documentation

◆ Map

template<typename T >
using openmsx::EnumSetting< T >::Map = std::vector<std::pair<std::string, T> >

Definition at line 35 of file EnumSetting.hh.

Constructor & Destructor Documentation

◆ EnumSetting()

template<typename T >
openmsx::EnumSetting< T >::EnumSetting ( CommandController commandController,
std::string_view  name,
std::string_view  description,
initialValue,
Map &&  map_,
SaveSetting  save = SAVE 
)

Definition at line 58 of file EnumSetting.hh.

References openmsx::TclObject::getString().

Member Function Documentation

◆ additionalInfo()

template<typename T >
void openmsx::EnumSetting< T >::additionalInfo ( TclObject result) const
override

Definition at line 80 of file EnumSetting.hh.

◆ getEnum() [1/2]

template<typename T >
T openmsx::EnumSetting< T >::getEnum
noexcept

◆ getEnum() [2/2]

bool openmsx::EnumSetting< bool >::getEnum ( ) const
inlinenoexcept

Definition at line 96 of file EnumSetting.hh.

◆ getString()

template<typename T >
std::string_view openmsx::EnumSetting< T >::getString

◆ getTypeString()

template<typename T >
std::string_view openmsx::EnumSetting< T >::getTypeString
override

Definition at line 74 of file EnumSetting.hh.

◆ setEnum()

template<typename T >
void openmsx::EnumSetting< T >::setEnum ( e)

Definition at line 103 of file EnumSetting.hh.

◆ tabCompletion()

template<typename T >
void openmsx::EnumSetting< T >::tabCompletion ( std::vector< std::string > &  tokens) const
override

Definition at line 86 of file EnumSetting.hh.


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