FIFE  6e1afdbeda11afe9ac53e6023a4be96ef88f1dc6
FIFE::RawDataMemSource Class Reference

Simpe RawDataSource that reads data from raw memory. More...

#include <rawdatamemsource.h>

+ Inheritance diagram for FIFE::RawDataMemSource:
+ Collaboration diagram for FIFE::RawDataMemSource:

Public Member Functions

 RawDataMemSource (uint32_t datalen)
 Create a new RawDataMemSource that allocates datalen bytes. More...
 
virtual ~RawDataMemSource ()
 
uint8_t * getRawData () const
 Get a Pointer to the data You need to use this function to fill the class with meaningfull data. More...
 
virtual uint32_t getSize () const
 get the complete datasize More...
 
virtual void readInto (uint8_t *buffer, uint32_t start, uint32_t length)
 read data from the source More...
 
- Public Member Functions inherited from FIFE::RawDataSource
 RawDataSource ()
 
virtual ~RawDataSource ()
 

Private Member Functions

 RawDataMemSource (const RawDataMemSource &)
 
RawDataMemSourceoperator= (const RawDataMemSource)
 

Private Attributes

uint8_t * m_data
 
uint32_t m_datalen
 

Detailed Description

Simpe RawDataSource that reads data from raw memory.

Note
This Class is not incomplete. Use getRawData to write into the Buffer.
See also
RawDataSource

Definition at line 48 of file rawdatamemsource.h.

Constructor & Destructor Documentation

FIFE::RawDataMemSource::RawDataMemSource ( uint32_t  datalen)

Create a new RawDataMemSource that allocates datalen bytes.

Parameters
datalenthe datalen to allocate

Definition at line 35 of file rawdatamemsource.cpp.

FIFE::RawDataMemSource::~RawDataMemSource ( )
virtual

Definition at line 38 of file rawdatamemsource.cpp.

References m_data.

FIFE::RawDataMemSource::RawDataMemSource ( const RawDataMemSource )
inlineprivate

Definition at line 69 of file rawdatamemsource.h.

Member Function Documentation

uint8_t * FIFE::RawDataMemSource::getRawData ( ) const

Get a Pointer to the data You need to use this function to fill the class with meaningfull data.

Definition at line 50 of file rawdatamemsource.cpp.

References m_data.

Referenced by FIFE::RawDataDAT1::RawDataDAT1(), and FIFE::RawDataDAT2::RawDataDAT2().

+ Here is the caller graph for this function:

uint32_t FIFE::RawDataMemSource::getSize ( ) const
virtual

get the complete datasize

Implements FIFE::RawDataSource.

Definition at line 42 of file rawdatamemsource.cpp.

References m_datalen.

Referenced by FIFE::RawDataDAT1::RawDataDAT1().

+ Here is the caller graph for this function:

RawDataMemSource& FIFE::RawDataMemSource::operator= ( const RawDataMemSource  )
inlineprivate

Definition at line 70 of file rawdatamemsource.h.

void FIFE::RawDataMemSource::readInto ( uint8_t *  buffer,
uint32_t  start,
uint32_t  length 
)
virtual

read data from the source

Parameters
bufferthe data will be written into buffer
startthe startindex inside the source
lengthlength bytes will be written into buffer

Implements FIFE::RawDataSource.

Definition at line 46 of file rawdatamemsource.cpp.

References m_data.

Member Data Documentation

uint8_t* FIFE::RawDataMemSource::m_data
private

Definition at line 66 of file rawdatamemsource.h.

Referenced by getRawData(), readInto(), and ~RawDataMemSource().

uint32_t FIFE::RawDataMemSource::m_datalen
private

Definition at line 67 of file rawdatamemsource.h.

Referenced by getSize().


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