2 * Copyright 2008, Haiku.
3 * Distributed under the terms of the MIT license.
6 * Michael Pfeiffer <laplace@users.sourceforge.net>
9 #ifndef _STATEMENT_WRAPPER_H
10 #define _STATEMENT_WRAPPER_H
12 #include "Statement.h"
14 // wrapper classes to provide specific access to
17 class StatementWrapper
20 Statement
* fStatement
;
23 StatementWrapper(Statement
* statement
);
25 Statement
* GetStatement() { return fStatement
; }
26 const char* GetKeyword() { return fStatement
->GetKeyword()->String(); }
29 class GroupStatement
: public StatementWrapper
35 GroupStatement(Statement
* statement
);
37 // test methods if the wrapped statement is a group statement
48 const char* GetGroupName();
49 const char* GetGroupTranslation();
61 class ConstraintsStatement
: public StatementWrapper
64 ConstraintsStatement(Statement
* statement
);
66 // is this realy a constraints statement
69 const char* GetFirstKeyword();
70 const char* GetFirstOption();
71 const char* GetSecondKeyword();
72 const char* GetSecondOption();
75 class OrderDependencyStatement
: public StatementWrapper
78 OrderDependencyStatement(Statement
* statement
);
80 // is this realy a order dependency statement
81 bool IsOrderDependency();
83 // is this a NonUIOrderDependencyStatement
87 const char* GetSection();
88 const char* GetKeyword();
89 const char* GetOption();