|
Botcraft 1.21.10
|
#include <StdAnyUtilities.hpp>
Static Public Member Functions | |
| static std::string | ToString (const std::any &value) |
| Give a string representation of a std::any value. | |
| static std::string | DefaultToString (const std::any &value) |
| Default function to convert all unregistered. | |
| static void | RegisterType (const std::type_index &index, const std::function< std::string(const std::any &)> &f) |
| template<class T > | |
| static void | RegisterType (const std::function< std::string(const std::any &)> &f) |
Static Private Attributes | |
| static std::unordered_map< std::type_index, std::function< std::string(const std::any &)> > | registered_types |
| Maps std::type_index of a std::any to a function to convert it to std::string. | |
Definition at line 12 of file StdAnyUtilities.hpp.
|
static |
Default function to convert all unregistered.
| value | Value to convert |
Definition at line 86 of file StdAnyUtilities.cpp.
References Botcraft::Utilities::Demangle().
Referenced by ToString().
|
inlinestatic |
Definition at line 28 of file StdAnyUtilities.hpp.
References RegisterType().
|
static |
Definition at line 91 of file StdAnyUtilities.cpp.
References registered_types.
Referenced by RegisterType().
|
static |
Give a string representation of a std::any value.
| value | A std::any object to convert to string |
Definition at line 75 of file StdAnyUtilities.cpp.
References DefaultToString(), and registered_types.
Referenced by Botcraft::Renderer::BehaviourRenderer::UpdateBlackboardValue().
|
staticprivate |
Maps std::type_index of a std::any to a function to convert it to std::string.
Definition at line 35 of file StdAnyUtilities.hpp.
Referenced by RegisterType(), and ToString().