CIRCT  19.0.0git
Public Member Functions | Private Attributes | List of all members
esi::MessageData Class Reference

A logical chunk of data representing serialized data. More...

#include <Common.h>

Collaboration diagram for esi::MessageData:
Collaboration graph

Public Member Functions

 MessageData ()=default
 Adopts the data vector buffer. More...
 MessageData (std::vector< uint8_t > &data)
 MessageData (const uint8_t *data, size_t size)
 ~MessageData ()=default
const uint8_t * getBytes () const
size_t getSize () const
 Get the size of the data in bytes. More...

Private Attributes

std::vector< uint8_t > data

Detailed Description

A logical chunk of data representing serialized data.

Currently, just a wrapper for a vector of bytes, which is not efficient in terms of memory copying. This will change in the future as will the API.

Definition at line 85 of file Common.h.

Constructor & Destructor Documentation

◆ MessageData() [1/3]

esi::MessageData::MessageData ( )

Adopts the data vector buffer.

◆ MessageData() [2/3]

esi::MessageData::MessageData ( std::vector< uint8_t > &  data)

Definition at line 89 of file Common.h.

◆ MessageData() [3/3]

esi::MessageData::MessageData ( const uint8_t *  data,
size_t  size 

Definition at line 90 of file Common.h.

◆ ~MessageData()

esi::MessageData::~MessageData ( )

Member Function Documentation

◆ getBytes()

const uint8_t* esi::MessageData::getBytes ( ) const

Definition at line 93 of file Common.h.

References data.

◆ getSize()

size_t esi::MessageData::getSize ( ) const

Get the size of the data in bytes.

Definition at line 95 of file Common.h.

References data.

Member Data Documentation

◆ data

std::vector<uint8_t> esi::MessageData::data

Definition at line 98 of file Common.h.

Referenced by getBytes(), and getSize().

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