Base Framework
Public Member Functions | List of all members
OrbBuffer Class Reference

ORB buffer. More...

#include <base/rmi/OrbBuffer.h>

Inherits Object.

Public Member Functions

 OrbBuffer (unsigned int size)
 
OrbBuffergetNext () noexcept
 
void setNext (OrbBuffer *next) noexcept
 
void reset () noexcept
 
unsigned int getReadable () const noexcept
 
unsigned int getWriteable () const noexcept
 
bool isEmpty () const noexcept
 
bool isFull () const noexcept
 
uint8 * push (unsigned int size) noexcept
 
const uint8 * pull (unsigned int size) noexcept
 

Detailed Description

ORB buffer.

Fast buffer implementation intended for linked lists.

Version
1.0

Constructor & Destructor Documentation

◆ OrbBuffer()

OrbBuffer::OrbBuffer ( unsigned int  size)
inline

Initializes the buffer with the specified size.

Member Function Documentation

◆ getNext()

OrbBuffer* OrbBuffer::getNext ( )
inlinenoexcept

Returns the next buffer.

◆ getReadable()

unsigned int OrbBuffer::getReadable ( ) const
inlinenoexcept

Returns the number of readable bytes.

◆ getWriteable()

unsigned int OrbBuffer::getWriteable ( ) const
inlinenoexcept

Returns the number of writeable bytes.

◆ isEmpty()

bool OrbBuffer::isEmpty ( ) const
inlinenoexcept

Returns true if no bytes are available for reading.

◆ isFull()

bool OrbBuffer::isFull ( ) const
inlinenoexcept

Returns true if no bytes may be written.

◆ pull()

const uint8* OrbBuffer::pull ( unsigned int  size)
inlinenoexcept

Reads the specified number of bytes.

Parameters
sizeThe number of bytes to read.
Returns
nullptr if the buffer doesn't contain the requested number of bytes.

◆ push()

uint8* OrbBuffer::push ( unsigned int  size)
inlinenoexcept

Allocates the specified number of bytes.

Parameters
sizeThe number of bytes to write.
Returns
nullptr if invalid request.

◆ reset()

void OrbBuffer::reset ( )
inlinenoexcept

Resets the buffer.

◆ setNext()

void OrbBuffer::setNext ( OrbBuffer next)
inlinenoexcept

Sets the next buffer.