summaryrefslogtreecommitdiff
path: root/core/variant.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/variant.h')
-rw-r--r--core/variant.h15
1 files changed, 9 insertions, 6 deletions
diff --git a/core/variant.h b/core/variant.h
index e77e2e93c4..45066af401 100644
--- a/core/variant.h
+++ b/core/variant.h
@@ -70,6 +70,7 @@ typedef PoolVector<Color> PoolColorArray;
class Variant {
public:
+ // If this changes the table in variant_op must be updated
enum Type {
NIL,
@@ -98,15 +99,15 @@ public:
_RID,
OBJECT,
DICTIONARY,
- ARRAY, // 20
+ ARRAY,
// arrays
- POOL_BYTE_ARRAY,
+ POOL_BYTE_ARRAY, // 20
POOL_INT_ARRAY,
POOL_REAL_ARRAY,
POOL_STRING_ARRAY,
- POOL_VECTOR2_ARRAY, // 25
- POOL_VECTOR3_ARRAY,
+ POOL_VECTOR2_ARRAY,
+ POOL_VECTOR3_ARRAY, // 25
POOL_COLOR_ARRAY,
VARIANT_MAX
@@ -288,6 +289,7 @@ public:
Variant(const IP_Address &p_address);
+ // If this changes the table in variant_op must be updated
enum Operator {
//comparation
@@ -299,7 +301,7 @@ public:
OP_GREATER_EQUAL,
//mathematic
OP_ADD,
- OP_SUBSTRACT,
+ OP_SUBTRACT,
OP_MULTIPLY,
OP_DIVIDE,
OP_NEGATE,
@@ -366,6 +368,7 @@ public:
static Vector<Variant> get_method_default_arguments(Variant::Type p_type, const StringName &p_method);
static Variant::Type get_method_return_type(Variant::Type p_type, const StringName &p_method, bool *r_has_return = NULL);
static Vector<StringName> get_method_argument_names(Variant::Type p_type, const StringName &p_method);
+ static bool is_method_const(Variant::Type p_type, const StringName &p_method);
void set_named(const StringName &p_index, const Variant &p_value, bool *r_valid = NULL);
Variant get_named(const StringName &p_index, bool *r_valid = NULL) const;
@@ -388,7 +391,7 @@ public:
uint32_t hash() const;
bool hash_compare(const Variant &p_variant) const;
- bool booleanize(bool &valid) const;
+ bool booleanize() const;
void static_assign(const Variant &p_variant);
static void get_constructor_list(Variant::Type p_type, List<MethodInfo> *p_list);