xref: /haiku/src/tests/add-ons/print/ppd/model/StatementListVisitor.h (revision e81a954787e50e56a7f06f72705b7859b6ab06d1)
1 /*
2  * Copyright 2008, Haiku.
3  * Distributed under the terms of the MIT license.
4  *
5  * Authors:
6  *		Michael Pfeiffer <laplace@users.sourceforge.net>
7  */
8 
9 #ifndef _STATEMENT_LIST_VISITOR_H
10 #define _STATEMENT_LIST_VISITOR_H
11 
12 #include "StatementWrapper.h"
13 #include "StatementList.h"
14 
15 class StatementListVisitor {
16 private:
17 	int32 fLevel;
18 public:
19 	StatementListVisitor() : fLevel(0) {}
20 	virtual ~StatementListVisitor() {}
21 
22 	virtual void Visit(StatementList* list);
23 
24 	// the nesting level
25 	int32 GetLevel() const { return fLevel; }
26 
27 	virtual void BeginGroup(GroupStatement* group) {};
28 	virtual void DoDefault(Statement* statement) {};
29 	virtual void DoQuery(Statement* statement) {};
30 	virtual void DoValue(Statement* statement) {};
31 	virtual void DoParam(Statement* statement) {};
32 	virtual void EndGroup(GroupStatement* group) {};
33 };
34 
35 
36 #endif
37