help: show defined action chains

This commit is contained in:
Andrzej Rybczak
2015-09-27 03:31:02 +02:00
parent 43a6b81820
commit 6ad3de7366
8 changed files with 157 additions and 28 deletions

View File

@@ -88,9 +88,9 @@ extern size_t FooterStartY;
struct BaseAction
{
BaseAction(Type type_, const char *name_): m_type(type_), m_name(name_) { }
BaseAction(Type type_, const char *name_): m_name(name_), m_type(type_) { }
const char *name() const { return m_name; }
const std::string &name() const { return m_name; }
Type type() const { return m_type; }
virtual bool canBeRun() { return true; }
@@ -104,12 +104,14 @@ struct BaseAction
}
return false;
}
protected:
std::string m_name;
private:
virtual void run() = 0;
Type m_type;
const char *m_name;
};
BaseAction &get(Type at);