Luanti 5.15.0-dev
 
Loading...
Searching...
No Matches
enum_string.h File Reference
#include <string_view>
#include <type_traits>
+ Include dependency graph for enum_string.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  EnumString
 

Functions

bool string_to_enum (const EnumString *spec, int &result, std::string_view str)
 
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)
 
const char * enum_to_string (const EnumString *spec, int num)
 

Function Documentation

◆ enum_to_string()

const char * enum_to_string ( const EnumString * spec,
int num )
nodiscard

References p().

Referenced by GenericCAO::addToScene(), ObjectProperties::dump(), ObjectRef::l_get_camera(), push_content_features(), push_hud_element(), push_item_definition_full(), push_object_properties(), push_wear_bar_params(), ObjectProperties::serialize(), and WearBarParams::serializeJson().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ string_to_enum() [1/2]

◆ 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 )

References string_to_enum().

+ Here is the call graph for this function: