#include <xml/utf8/Builder.h>
Public Methods | |
| Builder () | |
| It's an interface, so this doesn't do anything. | |
| virtual | ~Builder () |
| It's an interface, so this doesn't do anything. | |
| virtual void | startElementTag (const Position &selbegin, const::std::string &name)=0 |
| The lexer encountered an element open tag, atributes may follow. | |
| virtual void | addAttribute (const Position &attrbegin, const Position &attrend, const Position &valbegin, const Position &valend, const::std::string &name)=0 |
| The lexer encountered an attribute of an element open tag. | |
| virtual void | endElementTag (const Position &selend, bool wasempty)=0 |
| The lexer encountered the closing '>' of an element open tag. | |
| virtual void | closeElementTag (const Position &celbegin, const Position &celend, const::std::string &name)=0 |
| The lexer encountered the close element tag (a tag of the form </p>. | |
This is so the Lexer doesn't have to know the details of how the parser (or whatever is interpreting the output of the Lexer) works. It follows the Builder pattern from Design Patterns.
In the various member functions that follow, there are various parameters describing the positions of things. In order to make this description clearer, here is a diagram:
<LongTagName withan="attribute">And some element text</LongTagName>
^ ^ ^ ^^^ ^ ^
| | | ||| | |
`->selbegin | | ||`->selend celbegin<-' celend<-'
| | ||
attrbegin<-' | |`->attrend
| |
valbegin<-' `->valend
Definition at line 44 of file Builder.h.
|
||||||||||||||||||||||||
|
The lexer encountered an attribute of an element open tag.
|
|
||||||||||||||||
|
The lexer encountered the close element tag (a tag of the form </p>.
|
|
||||||||||||
|
The lexer encountered the closing '>' of an element open tag.
|
|
||||||||||||
|
The lexer encountered an element open tag, atributes may follow.
|
1.3-rc1