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