FastUIDraw
Public Member Functions | List of all members
fastuidraw::DataBuffer Class Reference

DataBuffer is an implementation of DataBufferBase where the data is directly backed by memory. More...

#include <data_buffer.hpp>

Inheritance diagram for fastuidraw::DataBuffer:
Inheritance graph
[legend]

Public Member Functions

 DataBuffer (unsigned int num_bytes, uint8_t init=uint8_t(0))
 
 DataBuffer (c_string filename)
 
 DataBuffer (c_array< const uint8_t > init_data)
 
- Public Member Functions inherited from fastuidraw::DataBufferBase
 DataBufferBase (c_array< const uint8_t > pdata_ro, c_array< uint8_t > pdata_rw)
 
c_array< const uint8_t > data_ro (void) const
 
c_array< uint8_t > data_rw (void)
 
- Public Member Functions inherited from fastuidraw::reference_counted_base< T, Counter >
 reference_counted_base (void)
 

Additional Inherited Members

- Static Public Member Functions inherited from fastuidraw::reference_counted_base< T, Counter >
static void add_reference (const reference_counted_base< T, Counter > *p)
 
static void remove_reference (const reference_counted_base< T, Counter > *p)
 

Detailed Description

DataBuffer is an implementation of DataBufferBase where the data is directly backed by memory.

Definition at line 74 of file data_buffer.hpp.

Constructor & Destructor Documentation

◆ DataBuffer() [1/3]

fastuidraw::DataBuffer::DataBuffer ( unsigned int  num_bytes,
uint8_t  init = uint8_t(0) 
)
inlineexplicit

Ctor. Initialize the DataBuffer to be backed by uninitalized memory. Use the pointer returned by data() to set the data.

Parameters
num_bytesnumber of bytes to give the backing store
initinitial value to give each byte

Definition at line 86 of file data_buffer.hpp.

◆ DataBuffer() [2/3]

fastuidraw::DataBuffer::DataBuffer ( c_string  filename)
inlineexplicit

Ctor. Initialize the DataBuffer to be backed by memory whose value is copied from a file.

Definition at line 96 of file data_buffer.hpp.

◆ DataBuffer() [3/3]

fastuidraw::DataBuffer::DataBuffer ( c_array< const uint8_t >  init_data)
inlineexplicit

Ctor. Initialize the DataBuffer to be backed by memory whose value is copied from a file.

Definition at line 106 of file data_buffer.hpp.


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