godot/core/core_constants.cpp

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

#include "core/input/input_event.h"
#include "core/object/class_db.h"
#include "core/os/keyboard.h"
#include "core/templates/hash_set.h"
#include "core/variant/variant.h"

struct _CoreConstant {};

static Vector<_CoreConstant> _global_constants;
static HashMap<StringName, int> _global_constants_map;
static HashMap<StringName, Vector<_CoreConstant>> _global_enums;

#ifdef DEBUG_METHODS_ENABLED

#define BIND_CORE_CONSTANT(m_constant)

#define BIND_CORE_ENUM_CONSTANT(m_constant)

#define BIND_CORE_BITFIELD_FLAG(m_constant)

// This just binds enum classes as if they were regular enum constants.
#define BIND_CORE_ENUM_CLASS_CONSTANT(m_enum, m_prefix, m_member)

#define BIND_CORE_BITFIELD_CLASS_FLAG(m_enum, m_prefix, m_member)

#define BIND_CORE_ENUM_CLASS_CONSTANT_CUSTOM(m_enum, m_name, m_member)

#define BIND_CORE_BITFIELD_CLASS_FLAG_CUSTOM(m_enum, m_name, m_member)

#define BIND_CORE_ENUM_CLASS_CONSTANT_NO_VAL(m_enum, m_prefix, m_member)

#define BIND_CORE_ENUM_CONSTANT_CUSTOM(m_custom_name, m_constant)

#define BIND_CORE_CONSTANT_NO_VAL(m_constant)

#define BIND_CORE_ENUM_CONSTANT_NO_VAL(m_constant)

#define BIND_CORE_ENUM_CONSTANT_CUSTOM_NO_VAL(m_custom_name, m_constant)

#else

#define BIND_CORE_CONSTANT

#define BIND_CORE_ENUM_CONSTANT

#define BIND_CORE_BITFIELD_FLAG

// This just binds enum classes as if they were regular enum constants.
#define BIND_CORE_ENUM_CLASS_CONSTANT

#define BIND_CORE_BITFIELD_CLASS_FLAG

#define BIND_CORE_ENUM_CLASS_CONSTANT_CUSTOM

#define BIND_CORE_BITFIELD_CLASS_FLAG_CUSTOM

#define BIND_CORE_ENUM_CLASS_CONSTANT_NO_VAL

#define BIND_CORE_ENUM_CONSTANT_CUSTOM

#define BIND_CORE_CONSTANT_NO_VAL

#define BIND_CORE_ENUM_CONSTANT_NO_VAL

#define BIND_CORE_ENUM_CONSTANT_CUSTOM_NO_VAL

#endif

void register_global_constants() {}

void unregister_global_constants() {}

int CoreConstants::get_global_constant_count() {}

StringName CoreConstants::get_global_constant_enum(int p_idx) {}

#ifdef DEBUG_METHODS_ENABLED
bool CoreConstants::is_global_constant_bitfield(int p_idx) {}

bool CoreConstants::get_ignore_value_in_docs(int p_idx) {}
#else
bool CoreConstants::is_global_constant_bitfield(int p_idx) {
	return false;
}

bool CoreConstants::get_ignore_value_in_docs(int p_idx) {
	return false;
}
#endif

const char *CoreConstants::get_global_constant_name(int p_idx) {}

int64_t CoreConstants::get_global_constant_value(int p_idx) {}

bool CoreConstants::is_global_constant(const StringName &p_name) {}

int CoreConstants::get_global_constant_index(const StringName &p_name) {}

bool CoreConstants::is_global_enum(const StringName &p_enum) {}

void CoreConstants::get_enum_values(const StringName &p_enum, HashMap<StringName, int64_t> *p_values) {}