![]() |
Leviathan
0.8.0.0
Leviathan game engine
|
Iterator for string types. More...
#include <StringDataIterator.h>
Public Member Functions | |
StringClassDataIterator (const STRType &str) | |
virtual bool | GetNextCharCode (int &codepointreceiver, size_t forward) |
Gets the next character unicode code point (usually an ascii value) More... | |
virtual bool | GetPreviousCharacter (int &receiver) |
Gets the previous character code point. More... | |
virtual void | MoveToNextCharacter () |
Moves the iterator forward. More... | |
virtual bool | ReturnSubString (size_t startpos, size_t endpos, STRType &receiver) |
virtual size_t | CurrentIteratorPosition () const |
Gets the position of the iterator, for use with ReturnSubString and others. More... | |
virtual bool | IsPositionValid () const |
Returns true when the iterator is still valid. More... | |
virtual size_t | GetLastValidIteratorPosition () const |
Gets the last valid index of the underlying string (not the last character but the last byte) More... | |
![]() | |
DLLEXPORT | StringDataIterator () |
virtual DLLEXPORT | ~StringDataIterator () |
virtual DLLEXPORT bool | ReturnSubString (size_t startpos, size_t endpos, std::string &receiver) |
virtual DLLEXPORT bool | ReturnSubString (size_t startpos, size_t endpos, std::wstring &receiver) |
virtual DLLEXPORT size_t | GetCurrentCharacterNumber () const |
Returns the 0 based character number (NOT position, number of characters) More... | |
virtual DLLEXPORT size_t | GetCurrentLineNumber () const |
Returns the 1 based line number. More... | |
Protected Attributes | |
STRType | OurString |
ITType | Current |
The current position of the iterator. More... | |
ITType | End |
The end of the string. More... | |
![]() | |
size_t | CurrentCharacterNumber |
size_t | CurrentLineNumber |
The current line number, the amount of characters. More... | |
Additional Inherited Members | |
![]() | |
DLLEXPORT void | CheckLineChange () |
Updates CurrentLineNumber if currently on a line break. More... | |
Iterator for string types.
Definition at line 89 of file StringDataIterator.h.
|
inline |
Wraps a string reference for StringIterator
Definition at line 95 of file StringDataIterator.h.
|
inlinevirtual |
Gets the position of the iterator, for use with ReturnSubString and others.
Implements Leviathan::StringDataIterator.
Definition at line 137 of file StringDataIterator.h.
|
inlinevirtual |
Gets the last valid index of the underlying string (not the last character but the last byte)
Implements Leviathan::StringDataIterator.
Definition at line 147 of file StringDataIterator.h.
|
inlinevirtual |
Gets the next character unicode code point (usually an ascii value)
forward | Defines how many characters past the current position the wanted character is. This is usually 0 or 1 |
Implements Leviathan::StringDataIterator.
Definition at line 104 of file StringDataIterator.h.
|
inlinevirtual |
Gets the previous character code point.
Implements Leviathan::StringDataIterator.
Definition at line 112 of file StringDataIterator.h.
|
inlinevirtual |
Returns true when the iterator is still valid.
Implements Leviathan::StringDataIterator.
Definition at line 141 of file StringDataIterator.h.
|
inlinevirtual |
Moves the iterator forward.
Implements Leviathan::StringDataIterator.
Definition at line 121 of file StringDataIterator.h.
|
inlinevirtual |
Definition at line 129 of file StringDataIterator.h.
|
protected |
The current position of the iterator.
Definition at line 159 of file StringDataIterator.h.
|
protected |
The end of the string.
Definition at line 161 of file StringDataIterator.h.
|
protected |
Definition at line 156 of file StringDataIterator.h.