diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2019-10-12 00:44:14 -0500 |
---|---|---|
committer | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2019-10-12 00:44:14 -0500 |
commit | 1f0a1dec1af315e6465e1c1dd503aa942a85b1f4 (patch) | |
tree | e8464d9f1e12d3366fa181a2c1dc95a68e817b9c /hscript/key.hh | |
parent | 47558ea71d523fb71307d394be4bfad8da4664d8 (diff) | |
download | horizon-1f0a1dec1af315e6465e1c1dd503aa942a85b1f4.tar.gz horizon-1f0a1dec1af315e6465e1c1dd503aa942a85b1f4.tar.bz2 horizon-1f0a1dec1af315e6465e1c1dd503aa942a85b1f4.tar.xz horizon-1f0a1dec1af315e6465e1c1dd503aa942a85b1f4.zip |
hscript: Pass opts to all validate()s, implement 'mount' validation
Diffstat (limited to 'hscript/key.hh')
-rw-r--r-- | hscript/key.hh | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/hscript/key.hh b/hscript/key.hh index 8b29212..aa8ed81 100644 --- a/hscript/key.hh +++ b/hscript/key.hh @@ -14,6 +14,7 @@ #define __HSCRIPT_KEY_HH_ #include <string> +#include "script.hh" namespace Horizon { namespace Keys { @@ -45,12 +46,12 @@ public: #undef UNUSED /*! Determines if the data associated with the Key is valid. */ - virtual bool validate() const = 0; + virtual bool validate(ScriptOptions) const = 0; /*! Executes the action associated with this Key. * @note Will always return `false` if `validate` is `false`. */ - virtual bool execute() const = 0; + virtual bool execute(ScriptOptions) const = 0; int lineno() const { return this->line; } }; @@ -83,7 +84,7 @@ public: bool test() const { return this->value; } /*! Key will fail to init if valid is invalid. */ - bool validate() const override; + bool validate(ScriptOptions) const override; }; @@ -100,7 +101,7 @@ public: /*! By default, key will be considered valid since it parsed. * This method should be overridden when further consideration is needed. */ - bool validate() const override; + bool validate(ScriptOptions) const override; }; } |