This is a helper class that facilitates operations with collections of tokens generated from Markup Parsers. More...
#include <texttoken.h>
Public Types | |
typedef TokenContainer::const_reverse_iterator | ConstReverseTokenIterator |
Const Reverse Iterator type for TextToken instances being stored by this class. | |
typedef TokenContainer::const_iterator | ConstTokenIterator |
Const Iterator type for TextToken instances being stored by this class. | |
typedef TokenContainer::reverse_iterator | ReverseTokenIterator |
Reverse Iterator type for TextToken instances being stored by this class. | |
typedef std::vector< TextToken * > | TokenContainer |
Basic container type for the storage of TextToken instances by this class. | |
typedef std::pair < TokenIterator, UInt32 > | TokenIndexPair |
An std::pair used to report the result of a TextToken and it's local index. | |
typedef TokenContainer::iterator | TokenIterator |
Iterator type for TextToken instances being stored by this class. | |
Public Member Functions | |
TokenString () | |
Class constructor. | |
virtual | ~TokenString () |
Class destructor. | |
TokenIterator | BeginToken () |
Gets an iterator to the first TextToken. More... | |
ConstTokenIterator | BeginToken () const |
Gets a const iterator to the first TextToken. More... | |
virtual UInt32 | ClearAllCharacters () |
Removes all the rendered characters from this string. More... | |
virtual void | DestroyAllTokens () |
Destroys all tokens currently in this string. | |
TokenIterator | EndToken () |
Gets an iterator to one passed the last TextToken. More... | |
ConstTokenIterator | EndToken () const |
Gets a const iterator to one passed the last TextToken. More... | |
virtual String | GetRawString () const |
Gets a string containing all the raw characters of the tokens in this string. More... | |
virtual UInt32 | InsertCharacter (const UInt32 Index, UInt32 UChar) |
Inserts a single UTF-32 size character into this string. More... | |
virtual UInt32 | InsertCharacters (const UInt32 Index, const Char8 *Characters, const UInt32 Size) |
Inserts multiple characters into this string. More... | |
virtual UInt32 | InsertCharacters (const UInt32 Index, const UInt32 *Characters, const UInt32 Size) |
Inserts multiple characters into this string. More... | |
virtual void | PushToken (TextToken *ToBePushed) |
Appends a new token to the end of this string. More... | |
virtual void | PushTokens (const TokenContainer &ToBePushed) |
Appends a group of tokens to the end of this string. More... | |
virtual UInt32 | RemoveCharacter (const UInt32 Index) |
Removes a single rendered character from this string. More... | |
virtual UInt32 | RemoveCharacters (const UInt32 Index, const UInt32 Length) |
Removes rendered characters from this string. More... | |
ReverseTokenIterator | ReverseBeginToken () |
Gets a reverse iterator to the last TextToken. More... | |
ConstReverseTokenIterator | ReverseBeginToken () const |
Gets a const reverse iterator to the last TextToken. More... | |
ReverseTokenIterator | ReverseEndToken () |
Gets a reverse iterator to one before the first TextToken. More... | |
ConstReverseTokenIterator | ReverseEndToken () const |
Gets a const reverse iterator to one before the first TextToken. More... | |
Protected Member Functions | |
TokenIndexPair | GetTokenIndex (const UInt32 Index) |
Gets the token at the string index, and it's local index. More... | |
Protected Attributes | |
TokenContainer | Tokens |
Container for TextToken storage. More... | |
This is a helper class that facilitates operations with collections of tokens generated from Markup Parsers.
Definition at line 297 of file texttoken.h.
TokenString::TokenIterator Mezzanine::UI::TokenString::BeginToken | ( | ) |
Gets an iterator to the first TextToken.
Definition at line 384 of file texttoken.cpp.
TokenString::ConstTokenIterator Mezzanine::UI::TokenString::BeginToken | ( | ) | const |
Gets a const iterator to the first TextToken.
Definition at line 390 of file texttoken.cpp.
|
virtual |
Removes all the rendered characters from this string.
Definition at line 491 of file texttoken.cpp.
TokenString::TokenIterator Mezzanine::UI::TokenString::EndToken | ( | ) |
Gets an iterator to one passed the last TextToken.
Definition at line 387 of file texttoken.cpp.
TokenString::ConstTokenIterator Mezzanine::UI::TokenString::EndToken | ( | ) | const |
Gets a const iterator to one passed the last TextToken.
Definition at line 393 of file texttoken.cpp.
|
virtual |
Gets a string containing all the raw characters of the tokens in this string.
Definition at line 374 of file texttoken.cpp.
|
protected |
Gets the token at the string index, and it's local index.
Definition at line 349 of file texttoken.cpp.
Inserts a single UTF-32 size character into this string.
Index | The index at which the character will be inserted. |
UChar | The unicode character to be inserted. This will be converted to UTF-8 prior to insertion. |
Definition at line 429 of file texttoken.cpp.
|
virtual |
Inserts multiple characters into this string.
Index | The index at which the characters will be inserted. |
Characters | An array of Char8's encoded in UTF-8 to be inserted. |
Size | The size of the array of Char8's passed in. |
Definition at line 443 of file texttoken.cpp.
|
virtual |
Inserts multiple characters into this string.
Index | The index at which the characters will be inserted. |
Characters | An array of UInt32's encoded in UTF-32 to be inserted. |
Size | The size of the array of UInt32's passed in. |
Definition at line 457 of file texttoken.cpp.
|
virtual |
Appends a new token to the end of this string.
ToBePushed | The token being added to this string. |
Definition at line 411 of file texttoken.cpp.
|
virtual |
Appends a group of tokens to the end of this string.
ToBePushed | A container |
Definition at line 414 of file texttoken.cpp.
Removes a single rendered character from this string.
Index | The index at which the rendered character will be removed. |
Definition at line 471 of file texttoken.cpp.
|
virtual |
Removes rendered characters from this string.
Index | The index at which to start removing characters from this string. |
Length | The number of characters to try and remove from this string. |
Definition at line 477 of file texttoken.cpp.
TokenString::ReverseTokenIterator Mezzanine::UI::TokenString::ReverseBeginToken | ( | ) |
Gets a reverse iterator to the last TextToken.
Definition at line 396 of file texttoken.cpp.
TokenString::ConstReverseTokenIterator Mezzanine::UI::TokenString::ReverseBeginToken | ( | ) | const |
Gets a const reverse iterator to the last TextToken.
Definition at line 402 of file texttoken.cpp.
TokenString::ReverseTokenIterator Mezzanine::UI::TokenString::ReverseEndToken | ( | ) |
Gets a reverse iterator to one before the first TextToken.
Definition at line 399 of file texttoken.cpp.
TokenString::ConstReverseTokenIterator Mezzanine::UI::TokenString::ReverseEndToken | ( | ) | const |
Gets a const reverse iterator to one before the first TextToken.
Definition at line 405 of file texttoken.cpp.
|
protected |
Container for TextToken storage.
Definition at line 315 of file texttoken.h.