test: Add multidict to support dictionary with duplicate key (laanwj)
[bitcoinplatinum.git] / src / leveldb / util / logging.h
blob1b450d2480e60d53b6e6454038b9e757df03946c
1 // Copyright (c) 2011 The LevelDB Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. See the AUTHORS file for names of contributors.
4 //
5 // Must not be included from any .h files to avoid polluting the namespace
6 // with macros.
8 #ifndef STORAGE_LEVELDB_UTIL_LOGGING_H_
9 #define STORAGE_LEVELDB_UTIL_LOGGING_H_
11 #include <stdio.h>
12 #include <stdint.h>
13 #include <string>
14 #include "port/port.h"
16 namespace leveldb {
18 class Slice;
19 class WritableFile;
21 // Append a human-readable printout of "num" to *str
22 extern void AppendNumberTo(std::string* str, uint64_t num);
24 // Append a human-readable printout of "value" to *str.
25 // Escapes any non-printable characters found in "value".
26 extern void AppendEscapedStringTo(std::string* str, const Slice& value);
28 // Return a human-readable printout of "num"
29 extern std::string NumberToString(uint64_t num);
31 // Return a human-readable version of "value".
32 // Escapes any non-printable characters found in "value".
33 extern std::string EscapeString(const Slice& value);
35 // Parse a human-readable number from "*in" into *value. On success,
36 // advances "*in" past the consumed number and sets "*val" to the
37 // numeric value. Otherwise, returns false and leaves *in in an
38 // unspecified state.
39 extern bool ConsumeDecimalNumber(Slice* in, uint64_t* val);
41 } // namespace leveldb
43 #endif // STORAGE_LEVELDB_UTIL_LOGGING_H_