summaryrefslogtreecommitdiff
path: root/hscript/meta.hh
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2020-08-30 07:49:03 -0500
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2020-08-30 07:49:03 -0500
commitcd61915f0b7ff3e53286178ac6f1dd3395a6b830 (patch)
tree8564c935a6f8c8cd0ca46745955e13029aa25f1d /hscript/meta.hh
parenteab23f62a434e26de082b67f4af339b14300eb27 (diff)
downloadhorizon-cd61915f0b7ff3e53286178ac6f1dd3395a6b830.tar.gz
horizon-cd61915f0b7ff3e53286178ac6f1dd3395a6b830.tar.bz2
horizon-cd61915f0b7ff3e53286178ac6f1dd3395a6b830.tar.xz
horizon-cd61915f0b7ff3e53286178ac6f1dd3395a6b830.zip
Rearchitect how 'bootloader' key works
Diffstat (limited to 'hscript/meta.hh')
-rw-r--r--hscript/meta.hh11
1 files changed, 9 insertions, 2 deletions
diff --git a/hscript/meta.hh b/hscript/meta.hh
index 8d56abb..32f8eb7 100644
--- a/hscript/meta.hh
+++ b/hscript/meta.hh
@@ -146,13 +146,20 @@ public:
bool execute() const override;
};
-class Bootloader : public StringKey {
+class Bootloader : public Key {
private:
+ const std::string _device;
+ const std::string _bootloader;
+
Bootloader(const Script *_s, const ScriptLocation &_p,
- const std::string &_v) : StringKey(_s, _p, _v) {}
+ const std::string &_d, const std::string &_b) : Key(_s, _p),
+ _device(_d), _bootloader(_b) {}
public:
static Key *parseFromData(const std::string &, const ScriptLocation &,
int *, int *, const Script *);
+
+ const std::string device() const { return this->_device; }
+ const std::string bootloader() const { return this->_bootloader; }
bool validate() const override;
bool execute() const override;
};