diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2019-10-08 21:19:13 -0500 |
---|---|---|
committer | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2019-10-08 21:19:13 -0500 |
commit | 7c1efb0e68e7decd2d5276e7ff02f65bde9bbf9a (patch) | |
tree | 4d11018a7dda0c5ba6b1c1e6bb1eaa86de6db026 /hscript/meta.hh | |
parent | be1cc09981d24c94a07f08c615e66e3a261294af (diff) | |
download | horizon-7c1efb0e68e7decd2d5276e7ff02f65bde9bbf9a.tar.gz horizon-7c1efb0e68e7decd2d5276e7ff02f65bde9bbf9a.tar.bz2 horizon-7c1efb0e68e7decd2d5276e7ff02f65bde9bbf9a.tar.xz horizon-7c1efb0e68e7decd2d5276e7ff02f65bde9bbf9a.zip |
hscript: Initial attempt at handling 'pkginstall' key
Diffstat (limited to 'hscript/meta.hh')
-rw-r--r-- | hscript/meta.hh | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/hscript/meta.hh b/hscript/meta.hh index 626ce91..6515259 100644 --- a/hscript/meta.hh +++ b/hscript/meta.hh @@ -14,6 +14,7 @@ #define __HSCRIPT_META_HH_ #include <string> +#include <set> #include "key.hh" namespace Horizon { @@ -33,6 +34,17 @@ public: }; class PkgInstall : public Key { +private: + const std::set<std::string> _pkgs; + PkgInstall(int _line, const std::set<std::string> my_pkgs) : Key(_line), + _pkgs(my_pkgs) {} +public: + static Key *parseFromData(const std::string data, int lineno, int *errors, + int *warnings); + const std::set<std::string> packages() const { return _pkgs; } + bool validate() const override { return true; } + bool execute() const override { return true; } + }; class Language : public Key { |