add string for type std::string

This commit is contained in:
Max Lyon
2021-03-02 01:22:19 +01:00
parent 71e05a9f5f
commit a1b3729d32
2 changed files with 4 additions and 0 deletions

View File

@@ -75,6 +75,8 @@ OM_REGISTER_PROPERTY_TYPE(double)
OM_REGISTER_PROPERTY_TYPE(float)
OM_REGISTER_PROPERTY_TYPE(int)
OM_REGISTER_PROPERTY_TYPE(std::string)
OM_REGISTER_PROPERTY_TYPE(std::vector<int>)
OM_REGISTER_PROPERTY_TYPE(std::vector<double>)
OM_REGISTER_PROPERTY_TYPE(std::vector<float>)

View File

@@ -47,6 +47,8 @@ inline std::string get_string_for_type(unsigned int){ return "uint";}
inline std::string get_string_for_type(unsigned short){ return "ushort";}
inline std::string get_string_for_type(unsigned long){ return "ulong";}
inline std::string get_string_for_type(std::string){ return "std::string";}
template <typename T> std::string get_string_for_type(T){return "unknown";}
template <typename T> std::string get_string_for_type(std::vector<T>){ return "std::vector<" + get_string_for_type(T()) + ">";}