Dusk Audio Framework
Loading...
Searching...
No Matches
HeapRingBuffer Class Reference

#include <RingBuffer.hpp>

Inheritance diagram for HeapRingBuffer:
RingBufferControl< HeapBuffer >

Public Member Functions

 HeapRingBuffer () noexcept
 ~HeapRingBuffer () noexcept override
bool createBuffer (const uint32_t size) noexcept
void deleteBuffer () noexcept
void copyFromAndClearOther (HeapRingBuffer &other)
Public Member Functions inherited from RingBufferControl< HeapBuffer >
bool isDataAvailableForReading () const noexcept
bool isEmpty () const noexcept
uint32_t getSize () const noexcept
uint32_t getReadableDataSize () const noexcept
uint32_t getWritableDataSize () const noexcept
void clearData () noexcept
void flush () noexcept
bool readBool () noexcept
uint8_t readByte () noexcept
int16_t readShort () noexcept
uint16_t readUShort () noexcept
int32_t readInt () noexcept
uint32_t readUInt () noexcept
int64_t readLong () noexcept
uint64_t readULong () noexcept
float readFloat () noexcept
double readDouble () noexcept
bool readCustomData (void *const data, const uint32_t size) noexcept
bool readCustomType (T &type) noexcept
uint32_t peekUInt () const noexcept
bool peekCustomType (T &type) const noexcept
bool writeBool (const bool value) noexcept
bool writeByte (const uint8_t value) noexcept
bool writeShort (const int16_t value) noexcept
bool writeUShort (const uint16_t value) noexcept
bool writeInt (const int32_t value) noexcept
bool writeUInt (const uint32_t value) noexcept
bool writeLong (const int64_t value) noexcept
bool writeULong (const uint64_t value) noexcept
bool writeFloat (const float value) noexcept
bool writeDouble (const double value) noexcept
bool writeCustomData (const void *const data, const uint32_t size) noexcept
bool writeCustomType (const T &type) noexcept
bool commitWrite (const char *const debugMsg=nullptr) noexcept
void setRingBuffer (HeapBuffer *const ringBuf, const bool clearRingBufferData) noexcept

Additional Inherited Members

Protected Member Functions inherited from RingBufferControl< HeapBuffer >
bool tryRead (void *const buf, const uint32_t size) noexcept
bool tryPeek (void *const buf, const uint32_t size) const noexcept
bool tryWrite (const void *const buf, const uint32_t size) noexcept

Detailed Description

RingBufferControl with a heap buffer. This is a convenience class that provides a method for creating and destroying the heap data. Requires the use of createBuffer(uint32_t) to make the ring buffer usable.

Constructor & Destructor Documentation

◆ HeapRingBuffer()

HeapRingBuffer::HeapRingBuffer ( )
inlinenoexcept

Constructor.

◆ ~HeapRingBuffer()

HeapRingBuffer::~HeapRingBuffer ( )
inlineoverridenoexcept

Destructor.

Member Function Documentation

◆ createBuffer()

bool HeapRingBuffer::createBuffer ( const uint32_t size)
inlinenoexcept

Create a buffer of the specified size.

◆ deleteBuffer()

void HeapRingBuffer::deleteBuffer ( )
inlinenoexcept

Delete the previously allocated buffer.


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