2 * Copyright 2008, Haiku.
3 * Distributed under the terms of the MIT license.
6 * Michael Pfeiffer <laplace@users.sourceforge.net>
12 #include "StatementList.h"
31 StatementList
* fChildren
;
33 const char* ElementForType();
39 void SetType(Type type
);
42 void SetKeyword(BString
* keyword
);
43 // mandatory in a valid statement
44 BString
* GetKeyword();
46 void SetOption(Value
* value
);
47 // optional in a valid statement
50 void SetValue(Value
* value
);
51 // optional in a valid statement
54 void AddChild(Statement
* statement
);
55 // optional in a valid statement
56 StatementList
* GetChildren();
58 // convenience methods
59 bool IsDefaultStatement() { return fType
== kDefault
; }
60 bool IsQueryStatement() { return fType
== kQuery
; }
61 bool IsValueStatement() { return fType
== kValue
; }
62 bool IsParamStatement() { return fType
== kParam
; }
63 bool IsUnknownStatement() { return fType
== kUnknown
; }
65 const char* GetKeywordString();
66 const char* GetOptionString();
67 const char* GetTranslationString();
68 const char* GetValueString();
69 const char* GetValueTranslationString();