command line interface can now execute scripts

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1053 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2008-08-04 19:55:34 +00:00
parent c9a402e3f5
commit ef598f2d8c
3 changed files with 108 additions and 22 deletions
+13 -3
View File
@@ -10,19 +10,29 @@
// ----------------------------------------------------------------------------- : Includes
#include <util/prec.hpp>
#include <data/set.hpp>
// ----------------------------------------------------------------------------- : Command line interface
class CLISetInterface {
class CLISetInterface : public SetView {
public:
CLISetInterface();
~CLISetInterface();
protected:
void onAction(const Action&, bool) {}
private:
bool quiet;
bool running;
bool quiet; ///< Supress prompts and other non-vital stuff
bool running; ///< Still running?
void run();
void showWelcome();
void showUsage();
void handleCommand(const String& command);
void showError(const String& error);
/// our own context, when no set is loaded
Context& getContext();
Context* our_context;
};
// ----------------------------------------------------------------------------- : EOF