actions: rework syntax and method visibility

This commit is contained in:
Andrzej Rybczak
2015-05-11 22:47:50 +02:00
parent a8e2ec5ed0
commit a76cfeef8d
2 changed files with 640 additions and 657 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -27,54 +27,50 @@
namespace Actions { namespace Actions {
struct PushCharacters : public BaseAction struct PushCharacters: BaseAction
{ {
PushCharacters(NC::Window **w, std::vector<int> &&queue) PushCharacters(NC::Window **w, std::vector<int> &&queue)
: BaseAction(Type::MacroUtility, ""), m_window(w), m_queue(queue) { } : BaseAction(Type::MacroUtility, ""), m_window(w), m_queue(queue) { }
protected:
virtual void run();
private: private:
virtual void run() OVERRIDE;
NC::Window **m_window; NC::Window **m_window;
std::vector<int> m_queue; std::vector<int> m_queue;
}; };
struct RequireRunnable : public BaseAction struct RequireRunnable: BaseAction
{ {
RequireRunnable(BaseAction *action) RequireRunnable(BaseAction *action)
: BaseAction(Type::MacroUtility, ""), m_action(action) { assert(action); } : BaseAction(Type::MacroUtility, ""), m_action(action) { assert(action); }
protected:
virtual bool canBeRun();
virtual void run() { }
private: private:
virtual bool canBeRun() OVERRIDE;
virtual void run() OVERRIDE { }
BaseAction *m_action; BaseAction *m_action;
}; };
struct RequireScreen : public BaseAction struct RequireScreen: BaseAction
{ {
RequireScreen(ScreenType screen_type) RequireScreen(ScreenType screen_type)
: BaseAction(Type::MacroUtility, ""), m_screen_type(screen_type) { } : BaseAction(Type::MacroUtility, ""), m_screen_type(screen_type) { }
protected:
virtual bool canBeRun();
virtual void run() { }
private: private:
virtual bool canBeRun() OVERRIDE;
virtual void run() OVERRIDE { }
ScreenType m_screen_type; ScreenType m_screen_type;
}; };
struct RunExternalCommand : public BaseAction struct RunExternalCommand: BaseAction
{ {
RunExternalCommand(std::string command) RunExternalCommand(std::string command)
: BaseAction(Type::MacroUtility, ""), m_command(command) { } : BaseAction(Type::MacroUtility, ""), m_command(command) { }
protected:
virtual void run();
private: private:
virtual void run() OVERRIDE;
std::string m_command; std::string m_command;
}; };