diff options
Diffstat (limited to 'core/variant.h')
-rw-r--r-- | core/variant.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/core/variant.h b/core/variant.h index 9109f4ad08..47fc3f43ac 100644 --- a/core/variant.h +++ b/core/variant.h @@ -167,14 +167,18 @@ public: static String get_type_name(Variant::Type p_type); static bool can_convert(Type p_type_from,Type p_type_to); + + template<class T> static Type get_type_for() { GetSimpleType<T> t; Variant v(t.type); - return v.get_type(); + Type r = v.get_type(); + return r; } + bool is_ref() const; _FORCE_INLINE_ bool is_num() const { return type==INT || type==REAL; }; _FORCE_INLINE_ bool is_array() const { return type>=ARRAY; }; @@ -415,6 +419,8 @@ public: static bool has_numeric_constant(Variant::Type p_type, const StringName& p_value); static int get_numeric_constant_value(Variant::Type p_type, const StringName& p_value); + String get_construct_string() const; + void operator=(const Variant& p_variant); // only this is enough for all the other types Variant(const Variant& p_variant); _FORCE_INLINE_ Variant() { type=NIL; } |