2 * Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de.
3 * Distributed under the terms of the MIT License.
5 #ifndef TYPE_HANDLER_ROSTER_H
6 #define TYPE_HANDLER_ROSTER_H
10 #include <ObjectList.h>
19 typedef BObjectList
<TypeHandler
> TypeHandlerList
;
22 class TypeHandlerRoster
{
27 static TypeHandlerRoster
* Default();
28 static status_t
CreateDefault();
29 static void DeleteDefault();
32 status_t
RegisterDefaultHandlers();
34 status_t
FindTypeHandler(ValueNodeChild
* nodeChild
,
35 Type
* type
, TypeHandler
*& _handler
);
36 // returns a reference
37 status_t
CreateValueNode(ValueNodeChild
* nodeChild
,
38 Type
* type
, ValueNode
*& _node
);
39 // returns a reference
41 bool RegisterHandler(TypeHandler
* handler
);
42 void UnregisterHandler(TypeHandler
* handler
);
46 TypeHandlerList fTypeHandlers
;
47 static TypeHandlerRoster
* sDefaultInstance
;
51 #endif // TYPE_HANDLER_ROSTER_H