headers/bsd: Add sys/queue.h.
[haiku.git] / src / tests / add-ons / print / ppd / model / Value.h
blobfc13e5e9a7d4da4f1e19cdd00acb3e393131ca51
1 /*
2 * Copyright 2008, Haiku.
3 * Distributed under the terms of the MIT license.
5 * Authors:
6 * Michael Pfeiffer <laplace@users.sourceforge.net>
7 */
9 #ifndef _VALUE_H
10 #define _VALUE_H
12 #include <String.h>
14 class Value {
15 public:
16 enum Type {
17 kSymbolValue,
18 kStringValue,
19 kInvocationValue,
20 kQuotedValue,
21 kUnknownValue
24 private:
25 Type fType;
26 BString* fValue;
27 BString* fTranslation;
29 const char* ElementForType();
31 public:
32 Value(BString* value = NULL, Type type = kUnknownValue);
33 virtual ~Value();
35 void SetType(Type type);
36 Type GetType();
38 // mandatory in a valid statement
39 void SetValue(BString* value);
40 BString* GetValue();
42 // optional
43 void SetTranslation(BString* translation);
44 BString* GetTranslation();
46 // convenience methods
47 const char* GetValueString();
48 const char* GetTranslationString();
50 void Print();
53 #endif