Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
godotengine
GitHub Repository: godotengine/godot
Path: blob/master/core/core_string_names.h
9887 views
1
/**************************************************************************/
2
/* core_string_names.h */
3
/**************************************************************************/
4
/* This file is part of: */
5
/* GODOT ENGINE */
6
/* https://godotengine.org */
7
/**************************************************************************/
8
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
9
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
10
/* */
11
/* Permission is hereby granted, free of charge, to any person obtaining */
12
/* a copy of this software and associated documentation files (the */
13
/* "Software"), to deal in the Software without restriction, including */
14
/* without limitation the rights to use, copy, modify, merge, publish, */
15
/* distribute, sublicense, and/or sell copies of the Software, and to */
16
/* permit persons to whom the Software is furnished to do so, subject to */
17
/* the following conditions: */
18
/* */
19
/* The above copyright notice and this permission notice shall be */
20
/* included in all copies or substantial portions of the Software. */
21
/* */
22
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
23
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
24
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
25
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
26
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
27
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
28
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
29
/**************************************************************************/
30
31
#pragma once
32
33
#include "core/string/string_name.h"
34
35
class CoreStringNames {
36
inline static CoreStringNames *singleton = nullptr;
37
38
public:
39
static void create() { singleton = memnew(CoreStringNames); }
40
static void free() {
41
memdelete(singleton);
42
singleton = nullptr;
43
}
44
45
_FORCE_INLINE_ static CoreStringNames *get_singleton() { return singleton; }
46
47
const StringName free_ = "free"; // free would conflict with C++ keyword.
48
const StringName changed = "changed";
49
const StringName script = "script";
50
const StringName script_changed = "script_changed";
51
const StringName _iter_init = "_iter_init";
52
const StringName _iter_next = "_iter_next";
53
const StringName _iter_get = "_iter_get";
54
const StringName get_rid = "get_rid";
55
const StringName _to_string = "_to_string";
56
const StringName _custom_features = "_custom_features";
57
58
const StringName x = "x";
59
const StringName y = "y";
60
const StringName z = "z";
61
const StringName w = "w";
62
const StringName r = "r";
63
const StringName g = "g";
64
const StringName b = "b";
65
const StringName a = "a";
66
const StringName position = "position";
67
const StringName size = "size";
68
const StringName end = "end";
69
const StringName basis = "basis";
70
const StringName origin = "origin";
71
const StringName normal = "normal";
72
const StringName d = "d";
73
const StringName h = "h";
74
const StringName s = "s";
75
const StringName v = "v";
76
const StringName r8 = "r8";
77
const StringName g8 = "g8";
78
const StringName b8 = "b8";
79
const StringName a8 = "a8";
80
81
const StringName call = "call";
82
const StringName call_deferred = "call_deferred";
83
const StringName bind = "bind";
84
const StringName notification = "notification";
85
const StringName property_list_changed = "property_list_changed";
86
};
87
88
#define CoreStringName(m_name) CoreStringNames::get_singleton()->m_name
89
90