diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2019-10-08 19:55:53 -0500 |
---|---|---|
committer | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2019-10-08 19:55:53 -0500 |
commit | 5b0d0916b27f271fc12a8c0c6b595e11673d306d (patch) | |
tree | d8d2f3413caac49c1410c539b43be4630924666b /hscript/meta.hh | |
parent | 57307442c5d707591dfc4d5e7671364fa564fa5c (diff) | |
download | horizon-5b0d0916b27f271fc12a8c0c6b595e11673d306d.tar.gz horizon-5b0d0916b27f271fc12a8c0c6b595e11673d306d.tar.bz2 horizon-5b0d0916b27f271fc12a8c0c6b595e11673d306d.tar.xz horizon-5b0d0916b27f271fc12a8c0c6b595e11673d306d.zip |
hscript: Implement 'hostname' parsing; add rest of existing manual tests
Diffstat (limited to 'hscript/meta.hh')
-rw-r--r-- | hscript/meta.hh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/hscript/meta.hh b/hscript/meta.hh index 9491aac..626ce91 100644 --- a/hscript/meta.hh +++ b/hscript/meta.hh @@ -13,12 +13,23 @@ #ifndef __HSCRIPT_META_HH_ #define __HSCRIPT_META_HH_ +#include <string> #include "key.hh" namespace Horizon { namespace Keys { class Hostname : public Key { +private: + const std::string _name; + Hostname(int _line, const std::string my_name) : Key(_line), + _name(my_name) {} +public: + static Key *parseFromData(const std::string data, int lineno, int *errors, + int *warnings); + const std::string name() const { return this->_name; } + bool validate() const override; + bool execute() const override; }; class PkgInstall : public Key { |