YARP  2.3.70.2
Yet Another Robot Platform
yarp::os::Bytes Class Reference

A simple abstraction for a block of bytes. More...

#include <yarp/os/Bytes.h>

Public Member Functions

 Bytes ()
 Default constructor. More...
 
 Bytes (char *data, size_t len)
 Constructor. More...
 
size_t length () const
 
char * get () const
 

Private Attributes

char * data
 
size_t len
 

Detailed Description

A simple abstraction for a block of bytes.

This class is not responsible for allocating or destroying those bytes, just recording their location.

Definition at line 26 of file Bytes.h.

Constructor & Destructor Documentation

◆ Bytes() [1/2]

yarp::os::Bytes::Bytes ( )
explicit

Default constructor.

No data present.

Definition at line 10 of file Bytes.cpp.

◆ Bytes() [2/2]

yarp::os::Bytes::Bytes ( char *  data,
size_t  len 
)

Constructor.

Parameters
dataaddress of data block
lenlength of data block

Definition at line 16 of file Bytes.cpp.

Member Function Documentation

◆ get()

char * yarp::os::Bytes::get ( ) const
Returns
address of data block

Definition at line 27 of file Bytes.cpp.

◆ length()

size_t yarp::os::Bytes::length ( ) const
Returns
length of data block

Definition at line 22 of file Bytes.cpp.

Member Data Documentation

◆ data

char* yarp::os::Bytes::data
private

Definition at line 51 of file Bytes.h.

◆ len

size_t yarp::os::Bytes::len
private

Definition at line 52 of file Bytes.h.


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