![]() | InDesign SDK 20.5 |
#include <CHMLFiltTokenisor.h>
Public Member Functions | |
| CHMLFiltTokenisor (IPMStream *s) | |
| ~CHMLFiltTokenisor (void) | |
| Token_t | GetNextToken (TokenValue &theToken) |
| Token_t | GetCurrentToken (TokenValue &theToken) |
| void | ResetStream (void) |
| void | PushTokenBack (void) |
Builds a basic abstraction onto the PMStream; redefines the stream in terms of our markup tokens.
There is no control placed on the stream, we might not be the only users of it. No definition of ownership... This is a very simple abstraction, as very little error handling is being done.
| CHMLFiltTokenisor::CHMLFiltTokenisor | ( | IPMStream * | s | ) |
Constructor. Initialize the stream and instance variables.
| s | The stream from which to read tokens. |
| CHMLFiltTokenisor::~CHMLFiltTokenisor | ( | void | ) |
Destructor.
| Token_t CHMLFiltTokenisor::GetCurrentToken | ( | TokenValue & | theToken | ) |
Returns the current token we are dealing with.
| theToken | The current token value. |
| Token_t CHMLFiltTokenisor::GetNextToken | ( | TokenValue & | theToken | ) |
Get the next token and its value (if it has one) from the stream
| theToken | The next token value in the stream. |
| void CHMLFiltTokenisor::PushTokenBack | ( | void | ) |
Pushes the token back. We need some mechanism to allow users of this module to disregard a token we push the token back onto the stream (only works once), the next time GetNextToken() is called, the token already read is returned. NOTE: This can only ever push one token back.
| void CHMLFiltTokenisor::ResetStream | ( | void | ) |
Rewinds the stream back to the beginning.