summaryrefslogtreecommitdiff
path: root/hscript/script.hh
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2020-02-26 03:38:30 -0600
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2020-02-26 03:38:30 -0600
commitca78cc8d66498cccf54ed26d5318f09362859ba7 (patch)
tree3866191d28f1d02c64f187935d8f0aa3bcc6b8a3 /hscript/script.hh
parent9cb6b1ed8523c39acc3d3096c1154152ea7174e7 (diff)
downloadhorizon-ca78cc8d66498cccf54ed26d5318f09362859ba7.tar.gz
horizon-ca78cc8d66498cccf54ed26d5318f09362859ba7.tar.bz2
horizon-ca78cc8d66498cccf54ed26d5318f09362859ba7.tar.xz
horizon-ca78cc8d66498cccf54ed26d5318f09362859ba7.zip
hscript: Add introspection support for Script class
Diffstat (limited to 'hscript/script.hh')
-rw-r--r--hscript/script.hh22
1 files changed, 22 insertions, 0 deletions
diff --git a/hscript/script.hh b/hscript/script.hh
index 9fd186a..8cf6c2a 100644
--- a/hscript/script.hh
+++ b/hscript/script.hh
@@ -20,6 +20,12 @@
namespace Horizon {
+namespace Keys {
+
+class Key;
+
+}
+
/**** Script option flags ****/
enum ScriptOptionFlags {
@@ -74,6 +80,22 @@ public:
/*! Executes the HorizonScript. */
bool execute() const;
+ /*! Retrieve the value of a specified key in this HorizonScript.
+ * @param name The name of the key to retrieve.
+ * @return The key object, if one exists. nullptr if the key has not been
+ * specified.
+ */
+ const Keys::Key *getOneValue(std::string name) const;
+
+ /*! Retrieve all values for a specified key in this HorizonScript.
+ * @param name The name of the key to retrieve.
+ * @return A std::vector of the key objects. The vector may be empty if
+ * no values exist for the specified key.
+ */
+ const std::vector<Keys::Key *> getValues(std::string name) const;
+
+ /*! Retrieve the options set for this HorizonScript object. */
+ ScriptOptions options() const;
private:
struct ScriptPrivate;
/*! Internal data. */