Simple Image Loading LibrarY 0.1.0
Public Member Functions | List of all members
MemoryDataSource Class Reference

Load an image from a memory area. More...

#include <SILLYMemoryDataSource.h>

Inheritance diagram for MemoryDataSource:
Inheritance graph
[legend]
Collaboration diagram for MemoryDataSource:
Collaboration graph
[legend]

Public Member Functions

const bytegetDataPtr () const
 Get raw access to the image data.
 
size_t getSize () const
 Return the size of the data.
 
 MemoryDataSource (const byte *data, size_t size)
 Create a data source from an existing memory area.
 
byte operator[] (size_t offset) const
 Retieve the byte at offset.
 

Detailed Description

Load an image from a memory area.

This class provides the services required to load an image from a byte array. The object does not change the memory area and does no take owner chip of the data.

Definition at line 48 of file SILLYMemoryDataSource.h.

Constructor & Destructor Documentation

◆ MemoryDataSource()

MemoryDataSource ( const byte data,
size_t  size 
)

Create a data source from an existing memory area.

The MemoryDataSource does not take the ownership of the memory pointed by data.

Parameters
dataa byte array of size size
sizethe size of data

Definition at line 46 of file SILLYMemoryDataSource.cpp.

Member Function Documentation

◆ getDataPtr()

const byte * getDataPtr ( ) const
virtual

Get raw access to the image data.

Implements DataSource.

◆ getSize()

size_t getSize ( ) const
virtual

Return the size of the data.

Implements DataSource.


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