aboutsummaryrefslogtreecommitdiff
path: root/src/action.h
blob: a5555a3a281595f287229b83a84bc837e0fa5af9 (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
44
45
#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 );
	void add( int nType, const char *sCmd );

	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;
	std::list<std::pair<int, std::string> > lRegExCommand;
};

#endif