vfs: check userland buffers before reading them.
[haiku.git] / src / apps / debugger / user_interface / gui / value / ValueHandler.h
blobae3087eec16f8de96e8160e2a9ffa853aa0d3d5f
1 /*
2 * Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de.
3 * Copyright 2015, Rene Gollent, rene@gollent.com.
4 * Distributed under the terms of the MIT License.
5 */
6 #ifndef VALUE_HANDLER_H
7 #define VALUE_HANDLER_H
10 #include <Referenceable.h>
13 class Settings;
14 class SettingsMenu;
15 class TableCellValueEditor;
16 class TableCellValueRenderer;
17 class Value;
18 class ValueFormatter;
21 class ValueHandler : public BReferenceable {
22 public:
23 virtual ~ValueHandler();
25 virtual float SupportsValue(Value* value) = 0;
26 virtual status_t GetValueFormatter(Value* value,
27 ValueFormatter*& _formatter) = 0;
28 // returns a reference
29 virtual status_t GetTableCellValueRenderer(Value* value,
30 TableCellValueRenderer*& _renderer) = 0;
31 // returns a reference
32 virtual status_t GetTableCellValueEditor(Value* value,
33 Settings* settings,
34 // may be NULL if preconfiguration with
35 // particular settings isn't desired.
36 TableCellValueEditor*& _editor);
37 // may return NULL, otherwise a reference
38 virtual status_t CreateTableCellValueSettingsMenu(Value* value,
39 Settings* settings, SettingsMenu*& _menu);
40 // may return NULL, otherwise a reference
44 #endif // VALUE_HANDLER_H