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

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

#include <yarp/os/Bytes.h>

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 27 of file Bytes.h.

Public Member Functions

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

Private Attributes

char * data
 
size_t len
 

Constructor & Destructor Documentation

◆ Bytes() [1/2]

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

Default constructor.

No data present.

Definition at line 13 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 19 of file Bytes.cpp.

Member Function Documentation

◆ get() [1/2]

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

Definition at line 30 of file Bytes.cpp.

◆ get() [2/2]

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

Definition at line 35 of file Bytes.cpp.

◆ length()

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

Definition at line 25 of file Bytes.cpp.

Member Data Documentation

◆ data

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

Definition at line 58 of file Bytes.h.

◆ len

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

Definition at line 59 of file Bytes.h.


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