actions: use namespace

This commit is contained in:
Andrzej Rybczak
2012-10-06 18:28:14 +02:00
parent 6709219aac
commit 3bd02f6abf
9 changed files with 633 additions and 616 deletions

View File

@@ -25,10 +25,12 @@
#include "actions.h"
#include "screen_type.h"
struct PushCharacters : public Action
namespace Actions {//
struct PushCharacters : public BaseAction
{
PushCharacters(NC::Window **w, std::vector<int> &&queue)
: Action(aMacroUtility, ""), m_window(w), m_queue(queue) { }
: BaseAction(aMacroUtility, ""), m_window(w), m_queue(queue) { }
protected:
virtual void run();
@@ -38,23 +40,23 @@ private:
std::vector<int> m_queue;
};
struct RequireRunnable : public Action
struct RequireRunnable : public BaseAction
{
RequireRunnable(Action *action)
: Action(aMacroUtility, ""), m_action(action) { assert(action); }
RequireRunnable(BaseAction *action)
: BaseAction(aMacroUtility, ""), m_action(action) { assert(action); }
protected:
virtual bool canBeRun() const;
virtual void run() { }
private:
Action *m_action;
BaseAction *m_action;
};
struct RequireScreen : public Action
struct RequireScreen : public BaseAction
{
RequireScreen(ScreenType screen_type)
: Action(aMacroUtility, ""), m_screen_type(screen_type) { }
: BaseAction(aMacroUtility, ""), m_screen_type(screen_type) { }
protected:
virtual bool canBeRun() const;
@@ -64,10 +66,10 @@ private:
ScreenType m_screen_type;
};
struct RunExternalCommand : public Action
struct RunExternalCommand : public BaseAction
{
RunExternalCommand(std::string command)
: Action(aMacroUtility, ""), m_command(command) { }
: BaseAction(aMacroUtility, ""), m_command(command) { }
protected:
virtual void run();
@@ -76,4 +78,6 @@ private:
std::string m_command;
};
}
#endif // NCMPCPP_MACRO_UTILITIES_H