Kicking it Olde Sküül! Burgerlib on Github Follow Olde Sküül on Twitter Burgerbecky on LinkedIn Burgerbecky on LinkedIn
Loading...
Searching...
No Matches
Burger::Flash::SharedBuffer Class Reference

Shared data buffer. More...

Inheritance diagram for Burger::Flash::SharedBuffer:
Collaboration diagram for Burger::Flash::SharedBuffer:

Public Member Functions

const Burger::StaticRTTIget_StaticRTTI (void) const noexcept override
 Get the description to the class.
 
 SharedBuffer ()
 Default constructor.
 
virtual ~SharedBuffer ()
 Release all data.
 
uintptr_t GetDataSize (void) const
 Get the size of the buffer in bytes.
 
void Append (uint8_t uInput)
 Append a byte at the end of the buffer.
 
const uint8_t * GetData (void) const
 Get the pointer to the buffer.
 
SimpleArray< uint8_t > * GetBuffer (void)
 Get the pointer to the SimpleArray.
 
- Public Member Functions inherited from Burger::ReferenceCounter
 ReferenceCounter () noexcept
 Sets the reference count to zero.
 
virtual ~ReferenceCounter ()
 Destructor.
 
void AddRef (void) noexcept
 Increase the reference count by 1.
 
void Release (void) noexcept
 Decrease the reference count by 1.
 
- Public Member Functions inherited from Burger::Base
const char * get_class_name (void) const noexcept
 Get the name of the class.
 
virtual ~Base () noexcept=default
 Destructor.
 

Static Public Attributes

static const Burger::StaticRTTI g_StaticRTTI
 The global description of the class.
 
- Static Public Attributes inherited from Burger::ReferenceCounter
static const Burger::StaticRTTI g_StaticRTTI
 The global description of the class.
 
- Static Public Attributes inherited from Burger::Base
static const Burger::StaticRTTI g_StaticRTTI
 The global description of the class.
 

Private Attributes

SimpleArray< uint8_t > m_Buffer
 Internal data buffer.
 

Detailed Description

Shared data buffer.


A shared buffer that's reference counted so multiple action script items can manager a single copy of this buffer

See also
ReferenceCounter

Constructor & Destructor Documentation

◆ SharedBuffer()

Burger::Flash::SharedBuffer::SharedBuffer ( )

Default constructor.


Initialize to an empty buffer

See also
~SharedBuffer()

◆ ~SharedBuffer()

Burger::Flash::SharedBuffer::~SharedBuffer ( )
virtual

Release all data.


Release the buffer and shut down the class

See also
SharedBuffer()

Member Function Documentation

◆ Append()

void Burger::Flash::SharedBuffer::Append ( uint8_t uInput)
inline

Append a byte at the end of the buffer.


See also
GetData(void) const or GetBuffer(void)

◆ get_StaticRTTI()

const Burger::StaticRTTI * Burger::Flash::SharedBuffer::get_StaticRTTI ( void ) const
overridevirtualnoexcept

Get the description to the class.


This virtual function will pull the pointer to the StaticRTTI instance that has the name of the class. Due to it being virtual, it will be the name of the most derived class.

Returns
Pointer to a global, read only instance of StaticRTTI for the true class

Reimplemented from Burger::ReferenceCounter.

◆ GetBuffer()

SimpleArray< uint8_t > * Burger::Flash::SharedBuffer::GetBuffer ( void )
inline

Get the pointer to the SimpleArray.


Returns
A pointer to the internal SimpleArray
See also
GetData(void) const

◆ GetData()

const uint8_t * Burger::Flash::SharedBuffer::GetData ( void ) const
inline

Get the pointer to the buffer.


Returns
The number of bytes in the buffer
See also
GetBuffer(void)

◆ GetDataSize()

uintptr_t Burger::Flash::SharedBuffer::GetDataSize ( void ) const
inline

Get the size of the buffer in bytes.


Returns
The number of bytes in the buffer
See also
GetData(void) const

Member Data Documentation

◆ g_StaticRTTI

const Burger::StaticRTTI Burger::Flash::SharedBuffer::g_StaticRTTI
static

The global description of the class.


This record contains the name of this class and a reference to the parent

◆ m_Buffer

SimpleArray<uint8_t> Burger::Flash::SharedBuffer::m_Buffer
private

Internal data buffer.