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.
Definition at line 42 of file FastBuffer.h.
◆ _FastBuffer_iterator() [1/2]
eprosima::fastcdr::_FastBuffer_iterator::_FastBuffer_iterator |
( |
| ) |
|
|
default |
Default constructor. The iterator points any position.
◆ _FastBuffer_iterator() [2/2]
eprosima::fastcdr::_FastBuffer_iterator::_FastBuffer_iterator |
( |
char * |
buffer, |
|
|
size_t |
index |
|
) |
| |
|
inlineexplicit |
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. |
Definition at line 58 of file FastBuffer.h.
◆ memcopy()
void eprosima::fastcdr::_FastBuffer_iterator::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. |
Definition at line 126 of file FastBuffer.h.
◆ operator!=()
bool eprosima::fastcdr::_FastBuffer_iterator::operator!= |
( |
const _FastBuffer_iterator & |
other_iterator | ) |
const |
|
inline |
◆ operator&()
char* eprosima::fastcdr::_FastBuffer_iterator::operator& |
( |
| ) |
|
|
inline |
This function returns the current position in the raw buffer.
- Returns
- The current position in the raw buffer.
Definition at line 211 of file FastBuffer.h.
◆ operator++() [1/2]
This function increments the iterator in one the position.
- Returns
- The current iterator.
Definition at line 187 of file FastBuffer.h.
◆ operator++() [2/2]
This function increments the iterator in one the position.
- Returns
- The current iterator.
Definition at line 198 of file FastBuffer.h.
◆ operator+=()
void eprosima::fastcdr::_FastBuffer_iterator::operator+= |
( |
size_t |
num_bytes | ) |
|
|
inline |
This function increments the position where the iterator points.
- Parameters
-
num_bytes | Number of bytes the iterator moves the position. |
Definition at line 157 of file FastBuffer.h.
◆ 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.
Definition at line 176 of file FastBuffer.h.
◆ operator-=()
void eprosima::fastcdr::_FastBuffer_iterator::operator-= |
( |
size_t |
num_bytes | ) |
|
|
inline |
◆ 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. |
Definition at line 73 of file FastBuffer.h.
◆ operator<<() [2/2]
template<typename _T >
void eprosima::fastcdr::_FastBuffer_iterator::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. |
Definition at line 101 of file FastBuffer.h.
◆ operator==()
bool eprosima::fastcdr::_FastBuffer_iterator::operator== |
( |
const _FastBuffer_iterator & |
other_iterator | ) |
const |
|
inline |
◆ operator>>() [1/2]
template<typename _T >
void eprosima::fastcdr::_FastBuffer_iterator::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
-
Definition at line 114 of file FastBuffer.h.
◆ 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. |
Definition at line 87 of file FastBuffer.h.
◆ rmemcopy()
void eprosima::fastcdr::_FastBuffer_iterator::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. |
Definition at line 142 of file FastBuffer.h.
◆ buffer_
char* eprosima::fastcdr::_FastBuffer_iterator::buffer_ {nullptr} |
|
private |
◆ current_position_
char* eprosima::fastcdr::_FastBuffer_iterator::current_position_ {nullptr} |
|
private |
Current position in the raw buffer.
Definition at line 234 of file FastBuffer.h.
The documentation for this class was generated from the following file: