Clio
develop
The XRP Ledger API server.
Theme:
Default
Round
Robot
Loading...
Searching...
No Matches
InputFile.hpp
1
#pragma once
2
3
#include "util/Shasum.hpp"
4
5
#include <xrpl/basics/base_uint.h>
6
7
#include <cstddef>
8
#include <cstring>
9
#include <fstream>
10
#include <iosfwd>
11
#include <string>
12
13
namespace
data::impl {
14
15
class
InputFile {
16
std::ifstream file_;
17
util::Sha256sum
shasum_;
18
19
public
:
20
InputFile(std::string
const
& path);
21
22
bool
23
isOpen()
const
;
24
25
template
<
typename
T>
26
bool
27
read(T& t)
28
{
29
return
readRaw(
reinterpret_cast<
char
*
>
(&t),
sizeof
(T));
30
}
31
32
bool
33
readRaw(
char
*
data
,
size_t
size);
34
35
ripple::uint256
36
hash()
const
;
37
};
38
}
// namespace data::impl
util::Sha256sum
Streaming SHA-256 hasher for large data sets.
Definition
Shasum.hpp:35
data
This namespace implements the data access layer and related components.
Definition
AmendmentCenter.cpp:56
src
data
impl
InputFile.hpp
Generated by
1.16.1