This is a helper class that facilitates operations with collections of tokens generated from Markup Parsers. More...
#include <texttoken.h>
Collaboration diagram for Mezzanine::UI::TokenString: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... | |
| Whole | GetNumCharacters () const |
| Gets the number of renderable characters that exist in this string. More... | |
| Whole | GetNumTokens () const |
| Gets the number of text tokens in this string. 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 282 of file texttoken.h.
| TokenString::TokenIterator Mezzanine::UI::TokenString::BeginToken | ( | ) |
Gets an iterator to the first TextToken.
Definition at line 457 of file texttoken.cpp.
| TokenString::ConstTokenIterator Mezzanine::UI::TokenString::BeginToken | ( | ) | const |
Gets a const iterator to the first TextToken.
Definition at line 463 of file texttoken.cpp.
|
virtual |
Removes all the rendered characters from this string.
Definition at line 564 of file texttoken.cpp.
| TokenString::TokenIterator Mezzanine::UI::TokenString::EndToken | ( | ) |
Gets an iterator to one passed the last TextToken.
Definition at line 460 of file texttoken.cpp.
| TokenString::ConstTokenIterator Mezzanine::UI::TokenString::EndToken | ( | ) | const |
Gets a const iterator to one passed the last TextToken.
Definition at line 466 of file texttoken.cpp.
| Whole Mezzanine::UI::TokenString::GetNumCharacters | ( | ) | const |
Gets the number of renderable characters that exist in this string.
Definition at line 442 of file texttoken.cpp.
| Whole Mezzanine::UI::TokenString::GetNumTokens | ( | ) | const |
Gets the number of text tokens in this string.
Definition at line 452 of file texttoken.cpp.
|
virtual |
Gets a string containing all the raw characters of the tokens in this string.
Definition at line 432 of file texttoken.cpp.
|
protected |
Gets the token at the string index, and it's local index.
| Index | The TokenString index of the character to retrieve. |
Definition at line 402 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 502 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 516 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 530 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 484 of file texttoken.cpp.
|
virtual |
Appends a group of tokens to the end of this string.
| ToBePushed | A container |
Definition at line 487 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 544 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 550 of file texttoken.cpp.
| TokenString::ReverseTokenIterator Mezzanine::UI::TokenString::ReverseBeginToken | ( | ) |
Gets a reverse iterator to the last TextToken.
Definition at line 469 of file texttoken.cpp.
| TokenString::ConstReverseTokenIterator Mezzanine::UI::TokenString::ReverseBeginToken | ( | ) | const |
Gets a const reverse iterator to the last TextToken.
Definition at line 475 of file texttoken.cpp.
| TokenString::ReverseTokenIterator Mezzanine::UI::TokenString::ReverseEndToken | ( | ) |
Gets a reverse iterator to one before the first TextToken.
Definition at line 472 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 478 of file texttoken.cpp.
|
protected |
Container for TextToken storage.
Definition at line 300 of file texttoken.h.
1.8.9.1. Thanks to the
Open Icon Library
for help with some of the icons.