#include <string_view>
#include <type_traits>
Go to the source code of this file.
◆ enum_to_string()
| const char * enum_to_string |
( |
const EnumString * | spec, |
|
|
int | num ) |
|
nodiscard |
◆ string_to_enum() [1/2]
| bool string_to_enum |
( |
const EnumString * | spec, |
|
|
int & | result, |
|
|
std::string_view | str ) |
References EnumString::num, and EnumString::str.
Referenced by ObjectProperties::deSerialize(), WearBarParams::deserializeJson(), get_compress_method(), getenumfield(), ModApiEnv::l_compare_block_status(), ModApiMapgen::l_get_mapgen_object(), ModApiMapgen::l_place_schematic(), ModApiMapgen::l_place_schematic_on_vmanip(), ModApiMapgen::l_register_ore(), ModApiMapgen::l_serialize_schematic(), ObjectRef::l_set_camera(), read_content_features(), ModApiHttp::read_http_fetch_request(), read_hud_change(), read_hud_element(), read_item_definition(), read_object_properties(), read_wear_bar_params(), LuaParticleParams::readLuaValue(), LuaParticleParams::readLuaValue(), LuaParticleParams::readLuaValue(), TouchControls::readSettings(), and string_to_enum().
◆ string_to_enum() [2/2]
template<typename T , std::enable_if_t< std::is_enum_v< T >, bool > = true>
| bool string_to_enum |
( |
const EnumString * | spec, |
|
|
T & | result, |
|
|
std::string_view | str ) |