Public Member Functions | Protected Member Functions | Protected Attributes

CTextToken Class Reference

Text tokens contain the normalized form of html text. More...

#include <nsHTMLTokens.h>

Inheritance diagram for CTextToken:
Collaboration diagram for CTextToken:

List of all members.

Public Member Functions

 CTextToken ()
 CTextToken (const nsAString &aString)
virtual nsresult Consume (PRUnichar aChar, nsScanner &aScanner, PRInt32 aMode)
 Causes token to consume data from given scanner.
virtual PRInt32 GetTokenType (void)
 Getter which retrieves type of token gess5/11/98.
virtual PRInt32 GetTextLength (void)
virtual void CopyTo (nsAString &aStr)
virtual const nsSubstringGetStringValue (void)
 Retrieve string value of the token gess5/11/98.
virtual void Bind (nsScanner *aScanner, nsScannerIterator &aStart, nsScannerIterator &aEnd)
virtual void Bind (const nsAString &aStr)
nsresult ConsumeCharacterData (PRBool aIgnoreComments, nsScanner &aScanner, const nsAString &aEndTagName, PRInt32 aFlag, PRBool &aFlushTokens)
nsresult ConsumeParsedCharacterData (PRBool aDiscardFirstNewline, PRBool aConservativeConsume, nsScanner &aScanner, const nsAString &aEndTagName, PRInt32 aFlag, PRBool &aFound)

Protected Member Functions

virtual size_t SizeOf () const
 Returns the size of the token object.

Protected Attributes

nsScannerSubstring mTextValue

Detailed Description

Text tokens contain the normalized form of html text.

These tokens are guaranteed not to contain entities, start or end tags, or newlines.

gess 3/25/98


Constructor & Destructor Documentation

CTextToken::CTextToken (  ) 
CTextToken::CTextToken ( const nsAString aString  ) 

Member Function Documentation

virtual void CTextToken::Bind ( nsScanner *  aScanner,
nsScannerIterator aStart,
nsScannerIterator aEnd 
) [virtual]
virtual void CTextToken::Bind ( const nsAString aStr  )  [virtual]
virtual nsresult CTextToken::Consume ( PRUnichar  aChar,
nsScanner &  aScanner,
PRInt32  aMode 
) [virtual]

Causes token to consume data from given scanner.

Note that behavior varies wildly between CToken subclasses. gess5/11/98

Parameters:
aChar -- most recent char consumed
aScanner -- input source where token should get data
Returns:
error code (0 means ok)

Reimplemented from CToken.

nsresult CTextToken::ConsumeCharacterData ( PRBool  aIgnoreComments,
nsScanner &  aScanner,
const nsAString aEndTagName,
PRInt32  aFlag,
PRBool aFlushTokens 
)
nsresult CTextToken::ConsumeParsedCharacterData ( PRBool  aDiscardFirstNewline,
PRBool  aConservativeConsume,
nsScanner &  aScanner,
const nsAString aEndTagName,
PRInt32  aFlag,
PRBool aFound 
)
virtual void CTextToken::CopyTo ( nsAString aStr  )  [virtual]
virtual const nsSubstring& CTextToken::GetStringValue ( void   )  [virtual]

Retrieve string value of the token gess5/11/98.

Returns:
reference to string containing string value

Implements CToken.

virtual PRInt32 CTextToken::GetTextLength ( void   )  [virtual]
virtual PRInt32 CTextToken::GetTokenType ( void   )  [virtual]

Getter which retrieves type of token gess5/11/98.

Returns:
int containing token type

Reimplemented from CToken.

virtual size_t CTextToken::SizeOf (  )  const [inline, protected, virtual]

Returns the size of the token object.

Implements CToken.


Member Data Documentation


The documentation for this class was generated from the following file: