![]() |
Project
|
#include <Cursor.h>
Public Member Functions | |
| Cursor (std::span< const uint8_t > buf, std::string const &file, uint64_t fileOffset=0, int64_t origin=0) | |
| size_t | pos () const |
| int64_t | displacement () const |
| size_t | remaining () const |
| std::span< const uint8_t > | buffer () const |
| void | seek (size_t p) |
| void | skip (size_t n) |
| void | back (size_t n) |
| std::span< const uint8_t > | bytes (size_t n) |
| uint8_t | u8 () |
| uint16_t | u16 () |
| uint32_t | u32 () |
| uint64_t | u64 () |
| int16_t | i16 () |
| int32_t | i32 () |
| int64_t | i64 () |
| double | f64 () |
| std::string | string () |
| TString: 1-byte length, or 0xFF followed by a 4-byte length. | |
| std::string | cstring () |
| NUL-terminated string, as used for class names after kNewClassTag. | |
| void | fail (std::string const &what) const |
| std::string const & | file () const |
Bounds-checked big-endian reader over a buffer. Every read past the end raises CorruptData, so malformed input can never cause an out-of-bounds read. fileOffset is where the buffer starts in the file, used in error messages. origin is added to positions to get ROOT's buffer displacement, which is what object references are keyed on (fKeylen for an object read from a key).
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |