xref: /haiku/headers/private/debugger/value/value_formatters/FloatValueFormatter.h (revision a3e794ae459fec76826407f8ba8c94cd3535f128)
1 /*
2  * Copyright 2015, Rene Gollent, rene@gollent.com.
3  * Distributed under the terms of the MIT License.
4  */
5 #ifndef FLOAT_VALUE_FORMATTER_H
6 #define FLOAT_VALUE_FORMATTER_H
7 
8 
9 #include "ValueFormatter.h"
10 
11 
12 class Settings;
13 class Value;
14 
15 
16 class FloatValueFormatter : public ValueFormatter {
17 public:
18 								FloatValueFormatter();
19 	virtual						~FloatValueFormatter();
20 
21 	virtual	Settings*			GetSettings() const
22 									{ return NULL; }
23 
24 	virtual	status_t			FormatValue(Value* value, BString& _output);
25 
26 	virtual	bool				SupportsValidation() const;
27 
28 	virtual	bool				ValidateFormattedValue(
29 									const BString& input,
30 									type_code type) const;
31 
32 	virtual	status_t			GetValueFromFormattedInput(
33 									const BString& input, type_code type,
34 									Value*& _output) const;
35 private:
36 
37 			status_t			_PerformValidation(const BString& input,
38 									type_code type,
39 									::Value*& _output,
40 									bool wantsValue) const;
41 };
42 
43 
44 #endif	// FLOAT_VALUE_FORMATTER_H
45