Compute Library
 21.05
MemoryImageFeeder Class Reference

Memory Image feeder concrete implementation. More...

#include <ImageLoader.h>

Collaboration diagram for MemoryImageFeeder:
[legend]

Public Member Functions

 MemoryImageFeeder (const uint8_t *data)
 Default constructor. More...
 
 MemoryImageFeeder (const MemoryImageFeeder &)=delete
 Prevent instances of this class from being copied (As this class contains pointers) More...
 
 MemoryImageFeeder (MemoryImageFeeder &&)=default
 Default move constructor. More...
 
MemoryImageFeederoperator= (const MemoryImageFeeder &)=delete
 Prevent instances of this class from being copied (As this class contains pointers) More...
 
MemoryImageFeederoperator= (MemoryImageFeeder &&)=default
 Default move assignment operator. More...
 
uint8_t get () override
 Gets a character from an image feed. More...
 
void get_row (uint8_t *dst, size_t row_size) override
 Feed a whole row to a destination pointer. More...
 
- Public Member Functions inherited from IImageDataFeeder
virtual ~IImageDataFeeder ()=default
 Virtual base destructor. More...
 

Detailed Description

Memory Image feeder concrete implementation.

Definition at line 90 of file ImageLoader.h.

Constructor & Destructor Documentation

◆ MemoryImageFeeder() [1/3]

MemoryImageFeeder ( const uint8_t *  data)
inline

Default constructor.

Parameters
[in]dataPointer to data

Definition at line 97 of file ImageLoader.h.

98  : _data(data)
99  {
100  }

◆ MemoryImageFeeder() [2/3]

MemoryImageFeeder ( const MemoryImageFeeder )
delete

Prevent instances of this class from being copied (As this class contains pointers)

◆ MemoryImageFeeder() [3/3]

Default move constructor.

Member Function Documentation

◆ get()

uint8_t get ( )
inlineoverridevirtual

Gets a character from an image feed.

Implements IImageDataFeeder.

Definition at line 110 of file ImageLoader.h.

111  {
112  return *_data++;
113  }

◆ get_row()

void get_row ( uint8_t *  dst,
size_t  row_size 
)
inlineoverridevirtual

Feed a whole row to a destination pointer.

Parameters
[out]dstDestination pointer
[in]row_sizeRow size in terms of bytes

Implements IImageDataFeeder.

Definition at line 114 of file ImageLoader.h.

115  {
116  ARM_COMPUTE_ERROR_ON(dst == nullptr);
117  memcpy(dst, _data, row_size);
118  _data += row_size;
119  }
#define ARM_COMPUTE_ERROR_ON(cond)
If the condition is true then an error message is printed and an exception thrown.
Definition: Error.h:466

References ARM_COMPUTE_ERROR_ON, and arm_compute::test::validation::dst.

◆ operator=() [1/2]

MemoryImageFeeder& operator= ( const MemoryImageFeeder )
delete

Prevent instances of this class from being copied (As this class contains pointers)

◆ operator=() [2/2]

MemoryImageFeeder& operator= ( MemoryImageFeeder &&  )
default

Default move assignment operator.


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