This class implements the iterator used to go through a FastBuffer.
More...
#include <FastBuffer.h>
This class implements the iterator used to go through a FastBuffer.
◆ _FastBuffer_iterator() [1/2]
Default constructor.
The iterator points any position.
◆ _FastBuffer_iterator() [2/2]
Constructor.
The iterator points to the indicated position.
- Parameters
-
buffer | Pointer to the raw buffer. |
index | Position of the raw buffer where the iterator will point. |
◆ memcopy()
void memcopy |
( |
const void * |
src, |
|
|
const size_t |
size |
|
) |
| |
|
inline |
This function copies a buffer into the raw buffer.
- Parameters
-
src | The source buffer. |
size | The number of bytes to be copied. |
◆ operator&()
This function returns the current position in the raw buffer.
- Returns
- The current position in the raw buffer.
◆ operator++() [1/2]
This function increments the iterator in one the position.
- Returns
- The current iterator.
◆ operator++() [2/2]
This function increments the iterator in one the position.
- Returns
- The current iterator.
◆ operator+=()
void operator+= |
( |
size_t |
numBytes | ) |
|
|
inline |
This function increments the position where the iterator points.
- Parameters
-
numBytes | Number of bytes the iterator moves the position. |
◆ operator-()
This operator returns the subtraction of the current interator's position and the source iterator's position.
- Parameters
-
it | Source iterator whose position is subtracted to the current iterator's position. |
- Returns
- The result of subtract the current iterator's position and the source iterator's position.
◆ operator<<() [1/2]
This operator changes the iterator's raw buffer.
This operator makes the iterator point to the same position but in another raw buffer. The new raw buffer is the same than the source iterator's.
- Parameters
-
iterator | The source iterator. The iterator will use the source iterator's raw buffer after this operation. |
◆ operator<<() [2/2]
void operator<< |
( |
const _T & |
data | ) |
|
|
inline |
This operator copies a data in the raw buffer.
The copy uses the size of the data type.
- Parameters
-
data | Data to be copied. Cannot be NULL. |
◆ operator>>() [1/2]
void operator>> |
( |
_T & |
data | ) |
|
|
inline |
This operator copies data from the raw buffer to a variable.
The copy uses the size of the data type.
- Parameters
-
◆ operator>>() [2/2]
This operator changes the position where the iterator points.
This operator takes the index of the source iterator, but the iterator continues using its raw buffer.
- Parameters
-
iterator | The source iterator. The iterator will use the source's iterator index to point to its own raw buffer. |
◆ rmemcopy()
void rmemcopy |
( |
void * |
dst, |
|
|
const size_t |
size |
|
) |
| |
|
inline |
This function copies from the raw buffer to a external buffer.
- Parameters
-
dst | The destination buffer. |
size | The size of bytes to be copied. |
The documentation for this class was generated from the following file: