Definition at line 193 of file block_log.cpp.
◆ fileptr_datastream()
sysio::chain::detail::fileptr_datastream::fileptr_datastream |
( |
FILE * | file, |
|
|
const std::string & | filename ) |
|
inlineexplicit |
Definition at line 195 of file block_log.cpp.
195: _file(file), _filename(filename) {}
◆ get() [1/2]
bool sysio::chain::detail::fileptr_datastream::get |
( |
char & | c | ) |
|
|
inline |
Definition at line 214 of file block_log.cpp.
214{
return read(&c, 1); }
bool read(char *d, size_t s)
◆ get() [2/2]
bool sysio::chain::detail::fileptr_datastream::get |
( |
unsigned char & | c | ) |
|
|
inline |
Definition at line 212 of file block_log.cpp.
212{
return get( *(
char*)&c ); }
bool get(unsigned char &c)
◆ read()
bool sysio::chain::detail::fileptr_datastream::read |
( |
char * | d, |
|
|
size_t | s ) |
|
inline |
Definition at line 204 of file block_log.cpp.
204 {
205 size_t result = fread( d, 1,
s, _file );
207 "only able to read ${act} bytes of the expected ${exp} bytes in file: ${file}",
208 (
"act",result)(
"exp",
s)(
"file", _filename) );
209 return true;
210 }
#define SYS_ASSERT(expr, exc_type, FORMAT,...)
◆ skip()
void sysio::chain::detail::fileptr_datastream::skip |
( |
size_t | s | ) |
|
|
inline |
Definition at line 197 of file block_log.cpp.
197 {
198 auto status = fseek(_file,
s, SEEK_CUR);
200 "Could not seek past ${bytes} bytes in Block log file at '${blocks_log}'. Returned status: ${status}",
201 (
"bytes",
s)(
"blocks_log", _filename)(
"status", status) );
202 }
The documentation for this class was generated from the following file: