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 7 8 9 #include <Variant.h> 10 11 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 21 }; 22 23 24 class IntegerFormatter { 25 public: 26 static bool FormatValue(const BVariant& value, 27 integer_format format, char* buffer, 28 size_t bufferSize); 29 }; 30 31 32 #endif // INTEGER_FORMATTER_H 33