blob: fefe84a173c83a1ace498b5b02fad3fef4780478 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
#ifndef SLANG_HEX_DUMP_UTIL_H
#define SLANG_HEX_DUMP_UTIL_H
#include "slang-common.h"
#include "slang-string.h"
#include "slang-list.h"
#include "../../slang.h"
namespace Slang
{
struct HexDumpUtil
{
/// Dump data to writer, with lines starting with hex data
static SlangResult dump(const List<uint8_t>& data, int numBytesPerLine, ISlangWriter* writer);
/// Dump a single value
static void dump(uint32_t value, ISlangWriter* writer);
static SlangResult dumpWithMarkers(const List<uint8_t>& data, int numBytesPerLine, ISlangWriter* writer);
/// Parses lines formatted by dump, back into bytes
static SlangResult parse(const UnownedStringSlice& lines, List<uint8_t>& outBytes);
static SlangResult parseWithMarkers(const UnownedStringSlice& lines, List<uint8_t>& outBytes);
};
}
#endif
|