aboutsummaryrefslogtreecommitdiff
path: root/src/action.h
blob: ea92efa4d7fc038c7a01b6347a98efafcb8ef7ee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#ifndef ACTION_H
#define ACTION_H

#include <list>
#include "staticstring.h"

class Command;
class Builder;

class Action
{
public:
	Action();
	Action( const char *sName );
	virtual ~Action();

	void add( Command *pCmd );

	const char *getName()
	{
		return sName;
	}
	bool isDefault()
	{
		return bDefault;
	}

	int getNumCommands()
	{
		return lCommand.size();
	}

	void debug();

	void execute( class Builder &bld );

private:
	bool bDefault;
	StaticString sName;
	std::list<Command *> lCommand;
};

#endif