A class that implements a text markup parser. Such a class takes text with in-line markup as input, and outputs parsed text (without markup) and a list of text styles.
#include <utility/YiTextMarkupParser.h>

Public Member Functions | |
| virtual | ~CYITextMarkupParser () |
| virtual bool | ParseMarkup (const CYIString &rMarkupText, const CYITextSceneNode::YI_TEXT_STYLE_DEF &rDefaultStyle, const CYICustomMarkupTagsProvider *pExternalTagsProvider, bool bLogErrors, CYIString *pParsedText, std::vector< CYITextSceneNode::YI_TEXT_STYLE_DEF > *pStyles) const =0 |
| Parses marked-up text and extracts the text without markup and the text styles. More... | |
|
inlinevirtual |
|
pure virtual |
Parses marked-up text and extracts the text without markup and the text styles.
This function has two inputs, and two outputs. The inputs to the parser are the marked up text (e.g. text with in-line markup) rMarkupText, and a default text style rDefaultStyle. The default text style is used to 'fill in' gaps in the text markup (since it isn't necessary to specify all styles in the marked-up text). The outputs of the function are a text string with markup removed, pParsedText, and a vector of text styles, pStyles. The outputs are provided as pointers – if the provided pointers are null, the corresponding output will not be written to.
External styles may be provided through the pExternalTagsProvider pointer. If non-null, the pointer is expected to point to a class that can provide tags for given names. The expected format of those tags is dependent on the parser implementation, but generally the external tags follow the same format as the internal tags.
Implemented in CYIYouIMarkupParser.