aboutsummaryrefslogtreecommitdiff
path: root/extension/src/TestSingleton.cpp
diff options
context:
space:
mode:
author ClarkeCode <clarke.john.robert@gmail.com>2023-04-27 22:13:52 +0200
committer ClarkeCode <clarke.john.robert@gmail.com>2023-04-27 22:13:52 +0200
commit0b273743b480874281a8987c72b2f1b666bc289a (patch)
tree3f5d5a6316ac66407e61c8a56fe732cdf06209e5 /extension/src/TestSingleton.cpp
parent98dd680a641a2cbe0f1f93202a5beffdfd35c9f7 (diff)
parent10053cf259c55ee45803268a844edf1011d8a16b (diff)
Merge branch 'main' of github.com:OpenVic2Project/OpenVic2 into goods
Diffstat (limited to 'extension/src/TestSingleton.cpp')
-rw-r--r--extension/src/TestSingleton.cpp36
1 files changed, 0 insertions, 36 deletions
diff --git a/extension/src/TestSingleton.cpp b/extension/src/TestSingleton.cpp
deleted file mode 100644
index 0855a30..0000000
--- a/extension/src/TestSingleton.cpp
+++ /dev/null
@@ -1,36 +0,0 @@
-#include "TestSingleton.hpp"
-
-#include <godot_cpp/core/class_db.hpp>
-#include <godot_cpp/variant/utility_functions.hpp>
-
-using namespace godot;
-using namespace OpenVic2;
-
-TestSingleton *TestSingleton::singleton = nullptr;
-
-void TestSingleton::_bind_methods()
-{
- ClassDB::bind_method(D_METHOD("hello_singleton"), &TestSingleton::hello_singleton);
-}
-
-TestSingleton *TestSingleton::get_singleton()
-{
- return singleton;
-}
-
-TestSingleton::TestSingleton()
-{
- ERR_FAIL_COND(singleton != nullptr);
- singleton = this;
-}
-
-TestSingleton::~TestSingleton()
-{
- ERR_FAIL_COND(singleton != this);
- singleton = nullptr;
-}
-
-void TestSingleton::hello_singleton()
-{
- UtilityFunctions::print("Hello GDExtension Singleton!");
-} \ No newline at end of file