Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes

CAttributeToken Class Reference

Attribute tokens are used to contain attribute key/value pairs whereever they may occur. More...

#include <nsHTMLTokens.h>

Inheritance diagram for CAttributeToken:
Collaboration diagram for CAttributeToken:

List of all members.

Public Member Functions

 CAttributeToken ()
 CAttributeToken (const nsAString &aString)
 CAttributeToken (const nsAString &aKey, const nsAString &aString)
 ~CAttributeToken ()
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.
const nsSubstringGetKey (void)
virtual void SetKey (const nsAString &aKey)
virtual void BindKey (nsScanner *aScanner, nsScannerIterator &aStart, nsScannerIterator &aEnd)
const nsSubstringGetValue (void)
virtual const nsSubstringGetStringValue (void)
 Retrieve string value of the token gess5/11/98.
virtual void GetSource (nsString_external &anOutputString)
virtual void AppendSourceTo (nsAString &anOutputString)
 harishd 03/23/00

Public Attributes

PRPackedBool mHasEqualWithoutValue

Protected Member Functions

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

Protected Attributes

nsScannerSharedSubstring mTextValue
nsScannerSubstring mTextKey

Detailed Description

Attribute tokens are used to contain attribute key/value pairs whereever they may occur.

Typically, they should occur only in start tokens. However, we may expand that ability when XML tokens become commonplace.

gess 3/25/98


Constructor & Destructor Documentation

CAttributeToken::CAttributeToken (  ) 
CAttributeToken::CAttributeToken ( const nsAString aString  ) 
CAttributeToken::CAttributeToken ( const nsAString aKey,
const nsAString aString 
)
CAttributeToken::~CAttributeToken (  )  [inline]

Member Function Documentation

virtual void CAttributeToken::AppendSourceTo ( nsAString anOutputString  )  [virtual]

harishd 03/23/00

Returns:
reference to string containing string value

Reimplemented from CToken.

virtual void CAttributeToken::BindKey ( nsScanner *  aScanner,
nsScannerIterator aStart,
nsScannerIterator aEnd 
) [virtual]
virtual nsresult CAttributeToken::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.

const nsSubstring& CAttributeToken::GetKey ( void   )  [inline]
virtual void CAttributeToken::GetSource ( nsString_external anOutputString  )  [virtual]
virtual const nsSubstring& CAttributeToken::GetStringValue ( void   )  [virtual]

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

Returns:
reference to string containing string value

Implements CToken.

virtual PRInt32 CAttributeToken::GetTokenType ( void   )  [virtual]

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

Returns:
int containing token type

Reimplemented from CToken.

const nsSubstring& CAttributeToken::GetValue ( void   )  [inline]
virtual void CAttributeToken::SetKey ( const nsAString aKey  )  [virtual]
virtual size_t CAttributeToken::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: