Variant cleanups and added variant op.

This commit is contained in:
Relintai 2023-12-31 14:26:06 +01:00
parent dae144ed0d
commit 052acd6f75
2 changed files with 5842 additions and 29 deletions

View File

@ -6,28 +6,23 @@
/* From https://github.com/Relintai/pandemonium_engine (MIT) */ /* From https://github.com/Relintai/pandemonium_engine (MIT) */
/*************************************************************************/ /*************************************************************************/
#include "core/containers/pool_vector.h" #include "pool_vector.h"
#include "core/containers/rid.h" #include "aabb.h"
#include "core/io/ip_address.h" #include "basis.h"
#include "core/math/aabb.h" #include "color.h"
#include "core/math/basis.h" #include "face3.h"
#include "core/math/color.h" #include "plane.h"
#include "core/math/face3.h" #include "projection.h"
#include "core/math/plane.h" #include "quaternion.h"
#include "core/math/projection.h" #include "transform.h"
#include "core/math/quaternion.h" #include "transform_2d.h"
#include "core/math/transform.h" #include "vector3.h"
#include "core/math/transform_2d.h" #include "vector3i.h"
#include "core/math/vector3.h" #include "vector4.h"
#include "core/math/vector3i.h" #include "vector4i.h"
#include "core/math/vector4.h" #include "ustring.h"
#include "core/math/vector4i.h" #include "array.h"
#include "core/object/object_id.h" #include "dictionary.h"
#include "core/object/ref_ptr.h"
#include "core/string/node_path.h"
#include "core/string/ustring.h"
#include "core/variant/array.h"
#include "core/variant/dictionary.h"
class Object; class Object;
class ObjectRC; class ObjectRC;
@ -216,7 +211,6 @@ public:
operator Color() const; operator Color() const;
operator NodePath() const; operator NodePath() const;
operator RefPtr() const; operator RefPtr() const;
operator ::RID() const;
operator Object *() const; operator Object *() const;
operator Node *() const; operator Node *() const;
@ -250,7 +244,6 @@ public:
operator Vector<Vector4>() const; operator Vector<Vector4>() const;
operator Vector<Vector4i>() const; operator Vector<Vector4i>() const;
operator Vector<Color>() const; operator Vector<Color>() const;
operator Vector<::RID>() const;
operator Vector<Vector2>() const; operator Vector<Vector2>() const;
operator Vector<Vector2i>() const; operator Vector<Vector2i>() const;
@ -261,8 +254,6 @@ public:
operator Side() const; operator Side() const;
operator Orientation() const; operator Orientation() const;
operator IP_Address() const;
Variant(bool p_bool); Variant(bool p_bool);
Variant(signed int p_int); // real one Variant(signed int p_int); // real one
Variant(unsigned int p_int); Variant(unsigned int p_int);
@ -301,7 +292,6 @@ public:
Variant(const Color &p_color); Variant(const Color &p_color);
Variant(const NodePath &p_node_path); Variant(const NodePath &p_node_path);
Variant(const RefPtr &p_resource); Variant(const RefPtr &p_resource);
Variant(const ::RID &p_rid);
Variant(const Object *p_object); Variant(const Object *p_object);
Variant(const Dictionary &p_dictionary); Variant(const Dictionary &p_dictionary);
@ -336,8 +326,6 @@ public:
Variant(const Vector<Vector4> &p_array); Variant(const Vector<Vector4> &p_array);
Variant(const Vector<Vector4i> &p_array); Variant(const Vector<Vector4i> &p_array);
Variant(const IP_Address &p_address);
// If this changes the table in variant_op must be updated // If this changes the table in variant_op must be updated
enum Operator { enum Operator {

5825
sfw/object/variant_op.cpp Normal file

File diff suppressed because it is too large Load Diff