InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
CHMLFiltTokenisor Class Reference

#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)
 

Detailed Description

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.

Constructor & Destructor Documentation

CHMLFiltTokenisor::CHMLFiltTokenisor (IPMStreams)

Constructor. Initialize the stream and instance variables.

Parameters
sThe stream from which to read tokens.
CHMLFiltTokenisor::~CHMLFiltTokenisor (void )

Destructor.

Member Function Documentation

Token_t CHMLFiltTokenisor::GetCurrentToken (TokenValuetheToken)

Returns the current token we are dealing with.

Parameters
theTokenThe current token value.
Returns
Token_t contains the type of token returned by reference (theToken).
Token_t CHMLFiltTokenisor::GetNextToken (TokenValuetheToken)

Get the next token and its value (if it has one) from the stream

Parameters
theTokenThe next token value in the stream.
Returns
Token_t contains the type of token returned by reference (theToken).
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.