group2 0.1.0
CSE 125 Group 2
Loading...
Searching...
No Matches
InputArchive Class Reference

Archive that deserializes trivially-copyable values from a byte buffer. More...

#include <RegistryArchive.hpp>

Public Member Functions

 InputArchive (const uint8_t *d, size_t s)
 Construct an InputArchive over an existing data buffer.
template<typename T>
void operator() (T &value)
 Read the next value from the buffer and advance the offset.

Private Attributes

const uint8_t * data
size_t size
size_t offset = 0

Detailed Description

Archive that deserializes trivially-copyable values from a byte buffer.

Constructor & Destructor Documentation

◆ InputArchive()

InputArchive::InputArchive ( const uint8_t * d,
size_t s )
inline

Construct an InputArchive over an existing data buffer.

Parameters
dPointer to the beginning of the buffer.
sSize of the buffer in bytes.

Member Function Documentation

◆ operator()()

template<typename T>
void InputArchive::operator() ( T & value)
inline

Read the next value from the buffer and advance the offset.

Template Parameters
TA trivially-copyable type.
Parameters
valueOutput parameter populated with the deserialized value.

Member Data Documentation

◆ data

const uint8_t* InputArchive::data
private

◆ offset

size_t InputArchive::offset = 0
private

◆ size

size_t InputArchive::size
private

The documentation for this class was generated from the following file: