retdec
|
#include <character_iterator.h>
Public Member Functions | |
CharacterIterator (It first, It last, std::size_t charStep) | |
CharacterIterator (It itr, It first, It last, std::size_t charStep) | |
CharacterIterator (const CharacterIterator &)=default | |
CharacterIterator & | operator= (const CharacterIterator &)=default |
char | operator* () const |
CharacterIterator & | operator++ () |
CharacterIterator | operator++ (int) |
CharacterIterator & | operator-- () |
CharacterIterator | operator-- (int) |
CharacterIterator & | operator+= (std::ptrdiff_t diff) |
CharacterIterator & | operator-= (std::ptrdiff_t diff) |
CharacterIterator | operator+ (std::ptrdiff_t diff) const |
CharacterIterator | operator- (std::ptrdiff_t diff) const |
std::ptrdiff_t | operator- (const CharacterIterator &rhs) const |
bool | operator== (const CharacterIterator &rhs) const |
bool | operator!= (const CharacterIterator &rhs) const |
bool | operator< (const CharacterIterator &rhs) const |
const It & | getUnderlyingIterator () const |
bool | pointsToValidCharacter (CharacterEndianness endian) const |
Private Member Functions | |
It | safeAdvance (std::ptrdiff_t n) |
bool | pointsToValidCharacter (const It &charByte, const It &paddingFirst, const It &paddingLast) const |
Private Attributes | |
It | itr |
It | first |
It | last |
std::size_t | charStep |
Represents iterator for string characters in the random access container. It supports different character sizes and performs boundary checks.
|
inline |
|
inline |
|
default |
|
inline |
Returns the underlying iterator of the byte sequence.
|
inline |
Checks whether iterators are not equal. They are equal if and only if they point to the same element.
true
if not equal, otherwise false
.
|
inline |
Dereference operator.
|
inline |
Moves iterator forwards by the specified amount of characters. Does not cross the end or beginning of the data.
|
inline |
Makes the iterator point to the next character. Does nothing if iterator would cross the end.
|
inline |
Makes the iterator point to the next character. Does nothing if iterator would cross the end.
|
inline |
Moves iterator forwards by the specified amount of characters. Does not cross the end or beginning of the data.
|
inline |
Returns the distance (in number of characters) between two iterators.
|
inline |
Moves iterator backwards by the specified amount of characters. Does not cross the end or beginning of the data.
|
inline |
Makes the iterator point to the previous character. Does nothing if iterator would cross the beginning.
|
inline |
Makes the iterator point to the previous character. Does nothing if iterator would cross the beginning.
|
inline |
Moves iterator backwards by the specified amount of characters. Does not cross the end or beginning of the data.
|
inline |
Checks whether one iterator is less than the other.
true
if it is less, otherwise false
.
|
default |
|
inline |
Checks whether iterators are equal. They are equal if and only if they point to the same element.
true
if equal, otherwise false
.
|
inline |
Checks whether the iterator points to a valid character. Character is valid if the underlying iterator points to a byte which is printable with respect to the provided endianness. In case of charStep
being greater than 1, the remaining bytes must be zero. If iterator points to an end, this function always returns false
.
true
if points to valid character, otherwise false
.
|
inlineprivate |
|
inlineprivate |
Advances iterator forwards or backwards with checking of boundaries.
n | Number of elements to advance. |
|
private |
|
private |
|
private |
|
private |