vfs: check userland buffers before reading them.
[haiku.git] / headers / private / debugger / util / IntegerFormatter.h
blob1bf0a1b15e23ba73ca63835711b4ea2207d6eea7
1 /*
2 * Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de.
3 * Distributed under the terms of the MIT License.
4 */
5 #ifndef INTEGER_FORMATTER_H
6 #define INTEGER_FORMATTER_H
9 #include <Variant.h>
12 enum integer_format {
13 INTEGER_FORMAT_DEFAULT = 0,
14 INTEGER_FORMAT_SIGNED = 1,
15 INTEGER_FORMAT_UNSIGNED = 2,
16 INTEGER_FORMAT_HEX_DEFAULT = 3,
17 INTEGER_FORMAT_HEX_8 = 8,
18 INTEGER_FORMAT_HEX_16 = 16,
19 INTEGER_FORMAT_HEX_32 = 32,
20 INTEGER_FORMAT_HEX_64 = 64
24 class IntegerFormatter {
25 public:
26 static bool FormatValue(const BVariant& value,
27 integer_format format, char* buffer,
28 size_t bufferSize);
32 #endif // INTEGER_FORMATTER_H