XipZ
Mini packer ▶►▸ for small programs.
Public Member Functions | Protected Attributes | List of all members
Data Class Reference

Input data type. More...

#include <data.hh>

Public Member Functions

 Data (const std::vector< uint8_t > &inp)
 Constructor with raw binary data as input. More...
 
uint16_t get_loadaddr () const
 get load address of data More...
 
std::vector< uint8_t >::size_type size () const
 get data size More...
 
uint8_t operator[] (unsigned int i) const
 
std::vector< uint8_t >::const_iterator begin () const
 
std::vector< uint8_t >::const_iterator end () const
 

Protected Attributes

uint16_t loadaddr
 original load address
 
std::vector< uint8_t > data
 binary data without the load address
 

Detailed Description

Input data type.

This class stores the loaded data and extracts the original load address. The data can be accessed via the public data member data.

Definition at line 20 of file data.hh.

Constructor & Destructor Documentation

◆ Data()

Data::Data ( const std::vector< uint8_t > &  inp)
inline

Constructor with raw binary data as input.

Constructs the objects with the given binary data. The load address is extracted immediately.

Parameters
inpraw binary data, must be at least three bytes long

Definition at line 33 of file data.hh.

Member Function Documentation

◆ get_loadaddr()

uint16_t Data::get_loadaddr ( ) const
inline

get load address of data

Just returns the deducted load address.

Returns
load address as an 16 bit unsigned integer.

Definition at line 47 of file data.hh.

◆ size()

std::vector<uint8_t>::size_type Data::size ( ) const
inline

get data size

Return the number of bytes in the data structure.

Returns
number of bytes

Definition at line 54 of file data.hh.


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