summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt3
-rw-r--r--hscript/key.hh18
-rw-r--r--hscript/keymanager.hh48
3 files changed, 1 insertions, 68 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8e11d96..f14aeb1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -15,8 +15,7 @@ set(HSCRIPT_SOURCE
)
set(HSCRIPT_INCLUDE
- hscript/script.hh
- hscript/keymanager.hh
+ hscript/script.hh
hscript/key.hh
)
diff --git a/hscript/key.hh b/hscript/key.hh
index 7c398ca..5a9613b 100644
--- a/hscript/key.hh
+++ b/hscript/key.hh
@@ -36,23 +36,5 @@ public:
bool execute();
};
-/*! Describes a Key class. */
-typedef struct KeyDesc {
- /*! The name of the Key. */
- std::string name;
- /*! Determines if the Key is required to be present for the HorizonScript
- * to be considered valid. */
- bool required;
- /*! Determines how many times this Key can be repeated.
- * If this value is 0, it can be repeated an unlimited number of times.
- * If this value is 1, it can only be present once per HorizonScript.
- */
- int repeat;
- /*! Order of the Key. Determines when the Key will be executed. */
- int order;
- /*! The function used to create a new Key of this type. */
- Key*(*key_create_fn)(void);
-} key_desc_t;
-
}
}
diff --git a/hscript/keymanager.hh b/hscript/keymanager.hh
deleted file mode 100644
index 347f5c2..0000000
--- a/hscript/keymanager.hh
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * keymanager.hh - Definition of the key manager
- * libhscript, the HorizonScript library for
- * Project Horizon
- *
- * Copyright (c) 2019 Adélie Linux and contributors. All rights reserved.
- * This code is licensed under the AGPL 3.0 license, as noted in the
- * LICENSE-code file in the root directory of this repository.
- *
- * SPDX-License-Identifier: AGPL-3.0-only
- */
-
-#include <vector>
-#include <string>
-#include <memory>
-#include "key.hh"
-
-namespace Horizon {
-namespace Keys {
-
-/*! Manages the Key classes. */
-class KeyManager {
-private:
- /*! Internal data class used by the KeyManager. */
- struct ManagerPrivate;
- /*! Internal data. */
- const std::unique_ptr<ManagerPrivate> internal;
-
- /*! Create the key manager */
- KeyManager();
-public:
- /*! Retrieve the global KeyManager instance. */
- static const KeyManager *getKeyManager();
-
- /*! Add a new Key to the key manager. */
- void addKey(key_desc_t description);
-
- /*! Determines if a Key is recognised. */
- void hasKey(std::string name);
-
- /*! Create a new Key with the specified name.
- * Returns nullptr if no Key exists.
- */
- Key *createKey(std::string name);
-};
-
-}
-}