godot/core/variant/variant_setget.cpp

/**************************************************************************/
/*  variant_setget.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_setget.h"

#include "variant_callable.h"

struct VariantSetterGetterInfo {};

static LocalVector<VariantSetterGetterInfo> variant_setters_getters[Variant::VARIANT_MAX];
static LocalVector<StringName> variant_setters_getters_names[Variant::VARIANT_MAX]; //one next to another to make it cache friendly

template <typename T>
static void register_member(Variant::Type p_type, const StringName &p_member) {}

void register_named_setters_getters() {}

void unregister_named_setters_getters() {}

bool Variant::has_member(Variant::Type p_type, const StringName &p_member) {}

Variant::Type Variant::get_member_type(Variant::Type p_type, const StringName &p_member) {}

void Variant::get_member_list(Variant::Type p_type, List<StringName> *r_members) {}

int Variant::get_member_count(Type p_type) {}

Variant::ValidatedSetter Variant::get_member_validated_setter(Variant::Type p_type, const StringName &p_member) {}
Variant::ValidatedGetter Variant::get_member_validated_getter(Variant::Type p_type, const StringName &p_member) {}

Variant::PTRSetter Variant::get_member_ptr_setter(Variant::Type p_type, const StringName &p_member) {}

Variant::PTRGetter Variant::get_member_ptr_getter(Variant::Type p_type, const StringName &p_member) {}

void Variant::set_named(const StringName &p_member, const Variant &p_value, bool &r_valid) {}

Variant Variant::get_named(const StringName &p_member, bool &r_valid) const {}

/**** INDEXED SETTERS AND GETTERS ****/

#ifdef DEBUG_ENABLED

#define OOB_TEST(m_idx, m_v)

#else

#define OOB_TEST

#endif

#ifdef DEBUG_ENABLED

#define NULL_TEST(m_key)

#else

#define NULL_TEST

#endif

#define INDEXED_SETGET_STRUCT_TYPED(m_base_type, m_elem_type)

#define INDEXED_SETGET_STRUCT_TYPED_NUMERIC(m_base_type, m_elem_type, m_assign_type)

#define INDEXED_SETGET_STRUCT_BULTIN_NUMERIC(m_base_type, m_elem_type, m_assign_type, m_max)

#define INDEXED_SETGET_STRUCT_BULTIN_ACCESSOR(m_base_type, m_elem_type, m_accessor, m_max)

#define INDEXED_SETGET_STRUCT_BULTIN_FUNC(m_base_type, m_elem_type, m_set, m_get, m_max)

struct VariantIndexedSetGet_Array {};

struct VariantIndexedSetGet_String {};

#define INDEXED_SETGET_STRUCT_DICT(m_base_type)

INDEXED_SETGET_STRUCT_BULTIN_NUMERIC()
INDEXED_SETGET_STRUCT_BULTIN_NUMERIC()
INDEXED_SETGET_STRUCT_BULTIN_NUMERIC()
INDEXED_SETGET_STRUCT_BULTIN_NUMERIC()
INDEXED_SETGET_STRUCT_BULTIN_NUMERIC()
INDEXED_SETGET_STRUCT_BULTIN_NUMERIC()
INDEXED_SETGET_STRUCT_BULTIN_NUMERIC()
INDEXED_SETGET_STRUCT_BULTIN_NUMERIC()

INDEXED_SETGET_STRUCT_BULTIN_ACCESSOR()
INDEXED_SETGET_STRUCT_BULTIN_FUNC()
INDEXED_SETGET_STRUCT_BULTIN_ACCESSOR()

INDEXED_SETGET_STRUCT_TYPED_NUMERIC()
INDEXED_SETGET_STRUCT_TYPED_NUMERIC()
INDEXED_SETGET_STRUCT_TYPED_NUMERIC()
INDEXED_SETGET_STRUCT_TYPED_NUMERIC()
INDEXED_SETGET_STRUCT_TYPED_NUMERIC()
INDEXED_SETGET_STRUCT_TYPED()
INDEXED_SETGET_STRUCT_TYPED()
INDEXED_SETGET_STRUCT_TYPED()
INDEXED_SETGET_STRUCT_TYPED()
INDEXED_SETGET_STRUCT_TYPED()

INDEXED_SETGET_STRUCT_DICT()

struct VariantIndexedSetterGetterInfo {};

static VariantIndexedSetterGetterInfo variant_indexed_setters_getters[Variant::VARIANT_MAX];

template <typename T>
static void register_indexed_member(Variant::Type p_type) {}

void register_indexed_setters_getters() {}

static void unregister_indexed_setters_getters() {}

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

Variant::Type Variant::get_indexed_element_type(Variant::Type p_type) {}

uint32_t Variant::get_indexed_element_usage(Variant::Type p_type) {}

Variant::ValidatedIndexedSetter Variant::get_member_validated_indexed_setter(Variant::Type p_type) {}
Variant::ValidatedIndexedGetter Variant::get_member_validated_indexed_getter(Variant::Type p_type) {}

Variant::PTRIndexedSetter Variant::get_member_ptr_indexed_setter(Variant::Type p_type) {}
Variant::PTRIndexedGetter Variant::get_member_ptr_indexed_getter(Variant::Type p_type) {}

void Variant::set_indexed(int64_t p_index, const Variant &p_value, bool &r_valid, bool &r_oob) {}
Variant Variant::get_indexed(int64_t p_index, bool &r_valid, bool &r_oob) const {}

uint64_t Variant::get_indexed_size() const {}

struct VariantKeyedSetGetDictionary {};

struct VariantKeyedSetGetObject {};

struct VariantKeyedSetterGetterInfo {};

static VariantKeyedSetterGetterInfo variant_keyed_setters_getters[Variant::VARIANT_MAX];

template <typename T>
static void register_keyed_member(Variant::Type p_type) {}

static void register_keyed_setters_getters() {}
bool Variant::is_keyed(Variant::Type p_type) {}

Variant::ValidatedKeyedSetter Variant::get_member_validated_keyed_setter(Variant::Type p_type) {}
Variant::ValidatedKeyedGetter Variant::get_member_validated_keyed_getter(Variant::Type p_type) {}
Variant::ValidatedKeyedChecker Variant::get_member_validated_keyed_checker(Variant::Type p_type) {}

Variant::PTRKeyedSetter Variant::get_member_ptr_keyed_setter(Variant::Type p_type) {}
Variant::PTRKeyedGetter Variant::get_member_ptr_keyed_getter(Variant::Type p_type) {}
Variant::PTRKeyedChecker Variant::get_member_ptr_keyed_checker(Variant::Type p_type) {}

void Variant::set_keyed(const Variant &p_key, const Variant &p_value, bool &r_valid) {}
Variant Variant::get_keyed(const Variant &p_key, bool &r_valid) const {}
bool Variant::has_key(const Variant &p_key, bool &r_valid) const {}

void Variant::set(const Variant &p_index, const Variant &p_value, bool *r_valid, VariantSetError *err_code) {}

Variant Variant::get(const Variant &p_index, bool *r_valid, VariantGetError *err_code) const {}

void Variant::get_property_list(List<PropertyInfo> *p_list) const {}

bool Variant::iter_init(Variant &r_iter, bool &valid) const {}

bool Variant::iter_next(Variant &r_iter, bool &valid) const {}

Variant Variant::iter_get(const Variant &r_iter, bool &r_valid) const {}

Variant Variant::duplicate(bool p_deep) const {}

Variant Variant::recursive_duplicate(bool p_deep, int recursion_count) const {}

void Variant::_register_variant_setters_getters() {}
void Variant::_unregister_variant_setters_getters() {}