2 * Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de.
3 * Distributed under the terms of the MIT License.
5 #ifndef VALUE_HANDLER_ROSTER_H
6 #define VALUE_HANDLER_ROSTER_H
10 #include <ObjectList.h>
13 class TableCellValueRenderer
;
19 typedef BObjectList
<ValueHandler
> ValueHandlerList
;
22 class ValueHandlerRoster
{
25 ~ValueHandlerRoster();
27 static ValueHandlerRoster
* Default();
28 static status_t
CreateDefault();
29 static void DeleteDefault();
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
);
49 ValueHandlerList fValueHandlers
;
50 static ValueHandlerRoster
* sDefaultInstance
;
54 #endif // VALUE_HANDLER_ROSTER_H