btrfs: Attempt to fix GCC2 build.
[haiku.git] / src / apps / debugger / user_interface / gui / value / ValueHandlerRoster.h
blobae04381c147333d5025753e05a585d54c4d4f6bd
1 /*
2 * Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de.
3 * Distributed under the terms of the MIT License.
4 */
5 #ifndef VALUE_HANDLER_ROSTER_H
6 #define VALUE_HANDLER_ROSTER_H
9 #include <Locker.h>
10 #include <ObjectList.h>
13 class TableCellValueRenderer;
14 class Value;
15 class ValueFormatter;
16 class ValueHandler;
19 typedef BObjectList<ValueHandler> ValueHandlerList;
22 class ValueHandlerRoster {
23 public:
24 ValueHandlerRoster();
25 ~ValueHandlerRoster();
27 static ValueHandlerRoster* Default();
28 static status_t CreateDefault();
29 static void DeleteDefault();
31 status_t Init();
32 status_t RegisterDefaultHandlers();
34 status_t FindValueHandler(Value* value,
35 ValueHandler*& _handler);
36 // returns a reference
37 status_t GetValueFormatter(Value* value,
38 ValueFormatter*& _formatter);
39 // returns a reference
40 status_t GetTableCellValueRenderer(Value* value,
41 TableCellValueRenderer*& _renderer);
42 // returns a reference
44 bool RegisterHandler(ValueHandler* handler);
45 void UnregisterHandler(ValueHandler* handler);
47 private:
48 BLocker fLock;
49 ValueHandlerList fValueHandlers;
50 static ValueHandlerRoster* sDefaultInstance;
54 #endif // VALUE_HANDLER_ROSTER_H