diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2019-10-05 20:38:14 -0500 |
---|---|---|
committer | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2019-10-05 20:38:14 -0500 |
commit | c0512bf3c20c8849670b0cf577d8118976ec0697 (patch) | |
tree | 5bd9957e785627c409033a63d11f7d3e2dfc9c7b /hscript/script.hh | |
parent | bc708581a4f10872ec3f8bd037e791b6be5a550d (diff) | |
download | horizon-c0512bf3c20c8849670b0cf577d8118976ec0697.tar.gz horizon-c0512bf3c20c8849670b0cf577d8118976ec0697.tar.bz2 horizon-c0512bf3c20c8849670b0cf577d8118976ec0697.tar.xz horizon-c0512bf3c20c8849670b0cf577d8118976ec0697.zip |
Tweak API
Diffstat (limited to 'hscript/script.hh')
-rw-r--r-- | hscript/script.hh | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/hscript/script.hh b/hscript/script.hh index 881c9d6..2abadd9 100644 --- a/hscript/script.hh +++ b/hscript/script.hh @@ -19,15 +19,24 @@ namespace Horizon { /*! Defines the Script class, which represents a HorizonScript. */ class Script { public: - /*! Load a HorizonScript from the specified path and attempt to parse. */ - Script(std::string path); - /*! Load a HorizonScript from the specified stream and attempt to parse. */ - Script(std::istream &stream); + /*! Initialise the Script class. */ + Script(); - /*! Determines if the HorizonScript parsed correctly. */ - bool isParsed(); + /*! Load a HorizonScript from the specified path. + * @param path The path to load from. + * @return true if the Script could be loaded; false otherwise. + */ + bool load(std::string path); + /*! Load a HorizonScript from the specified stream. + * @param stream The stream to load from. + * @return true if the Script could be loaded; false otherwise. + */ + bool load(std::istream &stream); + + /*! Parses the HorizonScript. */ + bool parse(); /*! Determines if the HorizonScript is valid. */ - bool isValid(); + bool validate(); private: struct ScriptPrivate; |