godot/core/variant/variant.cpp

/**************************************************************************/
/*  variant.cpp                                                           */
/**************************************************************************/
/*                         This file is part of:                          */
/*                             GODOT ENGINE                               */
/*                        https://godotengine.org                         */
/**************************************************************************/
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur.                  */
/*                                                                        */
/* Permission is hereby granted, free of charge, to any person obtaining  */
/* a copy of this software and associated documentation files (the        */
/* "Software"), to deal in the Software without restriction, including    */
/* without limitation the rights to use, copy, modify, merge, publish,    */
/* distribute, sublicense, and/or sell copies of the Software, and to     */
/* permit persons to whom the Software is furnished to do so, subject to  */
/* the following conditions:                                              */
/*                                                                        */
/* The above copyright notice and this permission notice shall be         */
/* included in all copies or substantial portions of the Software.        */
/*                                                                        */
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,        */
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF     */
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY   */
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,   */
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE      */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
/**************************************************************************/

#include "variant.h"

#include "core/debugger/engine_debugger.h"
#include "core/io/json.h"
#include "core/io/marshalls.h"
#include "core/io/resource.h"
#include "core/math/math_funcs.h"
#include "core/string/print_string.h"
#include "core/variant/variant_parser.h"

PagedAllocator<Variant::Pools::BucketSmall, true> Variant::Pools::_bucket_small;
PagedAllocator<Variant::Pools::BucketMedium, true> Variant::Pools::_bucket_medium;
PagedAllocator<Variant::Pools::BucketLarge, true> Variant::Pools::_bucket_large;

String Variant::get_type_name(Variant::Type p_type) {}

bool Variant::can_convert(Variant::Type p_type_from, Variant::Type p_type_to) {}

bool Variant::can_convert_strict(Variant::Type p_type_from, Variant::Type p_type_to) {}

bool Variant::operator==(const Variant &p_variant) const {}

bool Variant::operator!=(const Variant &p_variant) const {}

bool Variant::operator<(const Variant &p_variant) const {}

bool Variant::is_zero() const {}

bool Variant::is_one() const {}

bool Variant::is_null() const {}

void Variant::ObjData::ref(const ObjData &p_from) {}

void Variant::ObjData::ref_pointer(Object *p_object) {}

void Variant::ObjData::unref() {}

void Variant::reference(const Variant &p_variant) {}

void Variant::zero() {}

void Variant::_clear_internal() {}

operator long()

operator int()

operator short()

operator signed char()

operator unsigned long()

operator unsigned int()

operator unsigned short()

operator unsigned char()

operator ObjectID()

operator char32_t()

operator float()

operator double()

operator StringName()

struct _VariantStrPair {};

operator String()

String stringify_variant_clean(const Variant &p_variant, int recursion_count) {}

template <typename T>
String stringify_vector(const T &vec, int recursion_count) {}

String Variant::stringify(int recursion_count) const {}

String Variant::to_json_string() const {}

operator Vector2()

operator Vector2i()

operator Rect2()

operator Rect2i()

operator Vector3()

operator Vector3i()

operator Vector4()

operator Vector4i()

operator Plane()

operator AABB()

operator Basis()

operator Quaternion()

operator Transform3D()

operator Projection()

operator Transform2D()

operator Color()

operator NodePath()

operator RID()

operator Object *()

Object *Variant::get_validated_object_with_check(bool &r_previously_freed) const {}

Object *Variant::get_validated_object() const {}

operator Dictionary()

operator Callable()

operator Signal()

template <typename DA, typename SA>
inline DA _convert_array(const SA &p_array) {}

template <typename DA>
inline DA _convert_array_from_variant(const Variant &p_variant) {}

operator Array()

operator Vector()

operator Vector()

operator Vector()

operator Vector()

operator Vector()

operator Vector()

operator Vector()

operator Vector()

operator Vector()

operator Vector()

/* helpers */

operator Vector()

operator Vector()

operator Vector()

operator Vector()

operator Vector()

operator Side()

operator Orientation()

operator IPAddress()

Variant::Variant(bool p_bool) :{}

Variant::Variant(int64_t p_int64) :{}

Variant::Variant(int32_t p_int32) :{}

Variant::Variant(int16_t p_int16) :{}

Variant::Variant(int8_t p_int8) :{}

Variant::Variant(uint64_t p_uint64) :{}

Variant::Variant(uint32_t p_uint32) :{}

Variant::Variant(uint16_t p_uint16) :{}

Variant::Variant(uint8_t p_uint8) :{}

Variant::Variant(float p_float) :{}

Variant::Variant(double p_double) :{}

Variant::Variant(const ObjectID &p_id) :{}

Variant::Variant(const StringName &p_string) :{}

Variant::Variant(const String &p_string) :{}

Variant::Variant(const char *const p_cstring) :{}

Variant::Variant(const char32_t *p_wstring) :{}

Variant::Variant(const Vector3 &p_vector3) :{}

Variant::Variant(const Vector3i &p_vector3i) :{}

Variant::Variant(const Vector4 &p_vector4) :{}

Variant::Variant(const Vector4i &p_vector4i) :{}

Variant::Variant(const Vector2 &p_vector2) :{}

Variant::Variant(const Vector2i &p_vector2i) :{}

Variant::Variant(const Rect2 &p_rect2) :{}

Variant::Variant(const Rect2i &p_rect2i) :{}

Variant::Variant(const Plane &p_plane) :{}

Variant::Variant(const ::AABB &p_aabb) :{}

Variant::Variant(const Basis &p_matrix) :{}

Variant::Variant(const Quaternion &p_quaternion) :{}

Variant::Variant(const Transform3D &p_transform) :{}

Variant::Variant(const Projection &pp_projection) :{}

Variant::Variant(const Transform2D &p_transform) :{}

Variant::Variant(const Color &p_color) :{}

Variant::Variant(const NodePath &p_node_path) :{}

Variant::Variant(const ::RID &p_rid) :{}

Variant::Variant(const Object *p_object) :{}

Variant::Variant(const Callable &p_callable) :{}

Variant::Variant(const Signal &p_callable) :{}

Variant::Variant(const Dictionary &p_dictionary) :{}

Variant::Variant(const Array &p_array) :{}

Variant::Variant(const PackedByteArray &p_byte_array) :{}

Variant::Variant(const PackedInt32Array &p_int32_array) :{}

Variant::Variant(const PackedInt64Array &p_int64_array) :{}

Variant::Variant(const PackedFloat32Array &p_float32_array) :{}

Variant::Variant(const PackedFloat64Array &p_float64_array) :{}

Variant::Variant(const PackedStringArray &p_string_array) :{}

Variant::Variant(const PackedVector2Array &p_vector2_array) :{}

Variant::Variant(const PackedVector3Array &p_vector3_array) :{}

Variant::Variant(const PackedColorArray &p_color_array) :{}

Variant::Variant(const PackedVector4Array &p_vector4_array) :{}

/* helpers */
Variant::Variant(const Vector<::RID> &p_array) :{}

Variant::Variant(const Vector<Plane> &p_array) :{}

Variant::Variant(const Vector<Face3> &p_face_array) {}

Variant::Variant(const Vector<Variant> &p_array) {}

Variant::Variant(const Vector<StringName> &p_array) {}

void Variant::operator=(const Variant &p_variant) {}

Variant::Variant(const IPAddress &p_address) :{}

Variant::Variant(const Variant &p_variant) {}

uint32_t Variant::hash() const {}

uint32_t Variant::recursive_hash(int recursion_count) const {}

#define hash_compare_scalar_base(p_lhs, p_rhs, semantic_comparison)

#define hash_compare_scalar(p_lhs, p_rhs)

#define hash_compare_vector2(p_lhs, p_rhs)

#define hash_compare_vector3(p_lhs, p_rhs)

#define hash_compare_vector4(p_lhs, p_rhs)

#define hash_compare_quaternion(p_lhs, p_rhs)

#define hash_compare_color(p_lhs, p_rhs)

#define hash_compare_packed_array(p_lhs, p_rhs, p_type, p_compare_func)

bool Variant::hash_compare(const Variant &p_variant, int recursion_count, bool semantic_comparison) const {}

bool Variant::identity_compare(const Variant &p_variant) const {}

bool StringLikeVariantComparator::compare(const Variant &p_lhs, const Variant &p_rhs) {}

bool Variant::is_ref_counted() const {}

bool Variant::is_type_shared(Variant::Type p_type) {}

bool Variant::is_shared() const {}

bool Variant::is_read_only() const {}

void Variant::_variant_call_error(const String &p_method, Callable::CallError &error) {}

void Variant::construct_from_string(const String &p_string, Variant &r_value, ObjectConstruct p_obj_construct, void *p_construct_ud) {}

String Variant::get_construct_string() const {}

String Variant::get_call_error_text(const StringName &p_method, const Variant **p_argptrs, int p_argcount, const Callable::CallError &ce) {}

String Variant::get_call_error_text(Object *p_base, const StringName &p_method, const Variant **p_argptrs, int p_argcount, const Callable::CallError &ce) {}

String Variant::get_callable_error_text(const Callable &p_callable, const Variant **p_argptrs, int p_argcount, const Callable::CallError &ce) {}

void Variant::register_types() {}
void Variant::unregister_types() {}