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: StatementListVisitor()19 StatementListVisitor() : fLevel(0) {} ~StatementListVisitor()20 virtual ~StatementListVisitor() {} 21 22 virtual void Visit(StatementList* list); 23 24 // the nesting level GetLevel()25 int32 GetLevel() const { return fLevel; } 26 BeginGroup(GroupStatement * group)27 virtual void BeginGroup(GroupStatement* group) {}; DoDefault(Statement * statement)28 virtual void DoDefault(Statement* statement) {}; DoQuery(Statement * statement)29 virtual void DoQuery(Statement* statement) {}; DoValue(Statement * statement)30 virtual void DoValue(Statement* statement) {}; DoParam(Statement * statement)31 virtual void DoParam(Statement* statement) {}; EndGroup(GroupStatement * group)32 virtual void EndGroup(GroupStatement* group) {}; 33 }; 34 35 36 #endif 37