aboutsummaryrefslogtreecommitdiff
path: root/src/viewercolorpct.h
blob: dc810c1cc34752182404a3184d7e03ffe7106057 (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
46
47
48
49
#ifndef VIEWER_COLOR_PCT_H
#define VIEWER_COLOR_PCT_H

#include <stdint.h>
#include <list>
#include "viewer.h"

class ViewerColorPct : public Viewer
{
public:
	ViewerColorPct();
	virtual ~ViewerColorPct();

	virtual void beginCommand( Action::eAction nAct, const std::string &sTarget );
	virtual void endCommand();

	virtual void beginRequiresCheck( bool bCached, const std::string &sName );
	virtual void endRequiresCheck();
	virtual void beginPerform( Perform *pPerform );
	virtual void endPerform();
	virtual void beginPerforms( int nCount );

	virtual void skipRequiresCheck( bool bCached, const std::string &sName );
	virtual void skipPerform( Perform *pPerform );

	virtual void beginAction( const std::string &sName, int nCommands );

	virtual void endAction();

	void printPerform(const char *sRule, const char *sTarget);
	void printHead();
	void indent();

private:
	int iTC, iCC;
	
	bool bRunClean;
	typedef struct
	{
		int nLevel;
		bool bCmdClean;
		std::string sTarget;
		int iTP, iCP;
	} Cmd;
	typedef std::list<Cmd> CmdStack;
	CmdStack sCmd;
};

#endif