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

CStartToken Class Reference

This declares start tokens, which always take the form <xxxx>. More...

#include <nsHTMLTokens.h>

Inheritance diagram for CStartToken:
Collaboration diagram for CStartToken:

List of all members.

Public Member Functions

 CStartToken (nsHTMLTag aTag=eHTMLTag_unknown)
 CStartToken (const nsAString &aString)
 CStartToken (const nsAString &aName, nsHTMLTag aTag)
virtual nsresult Consume (PRUnichar aChar, nsScanner &aScanner, PRInt32 aMode)
 Causes token to consume data from given scanner.
virtual PRInt32 GetTypeID (void)
 Getter which retrieves the current ordinal value for this token gess5/11/98.
virtual PRInt32 GetTokenType (void)
 Getter which retrieves type of token gess5/11/98.
virtual PRBool IsEmpty (void)
virtual void SetEmpty (PRBool aValue)
 If aValue is TRUE then the token represents a short-hand tag.
virtual const nsSubstringGetStringValue ()
 Retrieve string value of the token gess5/11/98.
virtual void GetSource (nsString_external &anOutputString)
virtual void AppendSourceTo (nsAString &anOutputString)
 harishd 03/23/00
virtual eContainerInfo GetContainerInfo (void) const
virtual void SetContainerInfo (eContainerInfo aContainerInfo)
virtual PRBool IsWellFormed (void) const
 For tokens who care, this can tell us whether the token is well formed or not.

Public Attributes

nsString_external mTextValue

Protected Member Functions

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

Protected Attributes

eContainerInfo mContainerInfo
PRPackedBool mEmpty

Detailed Description

This declares start tokens, which always take the form <xxxx>.

This class also knows how to consume related attributes.

gess 3/25/98


Constructor & Destructor Documentation

CStartToken::CStartToken ( nsHTMLTag  aTag = eHTMLTag_unknown  ) 
CStartToken::CStartToken ( const nsAString aString  ) 
CStartToken::CStartToken ( const nsAString aName,
nsHTMLTag  aTag 
)

Member Function Documentation

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

harishd 03/23/00

Returns:
reference to string containing string value

Reimplemented from CToken.

virtual nsresult CStartToken::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.

virtual eContainerInfo CStartToken::GetContainerInfo ( void   )  const [inline, virtual]

Reimplemented from CHTMLToken.

virtual void CStartToken::GetSource ( nsString_external anOutputString  )  [virtual]
virtual const nsSubstring& CStartToken::GetStringValue (  )  [virtual]

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

Returns:
reference to string containing string value

Implements CToken.

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

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

Returns:
int containing token type

Reimplemented from CToken.

virtual PRInt32 CStartToken::GetTypeID ( void   )  [virtual]

Getter which retrieves the current ordinal value for this token gess5/11/98.

Returns:
current ordinal value

Reimplemented from CToken.

virtual PRBool CStartToken::IsEmpty ( void   )  [virtual]

Reimplemented from CToken.

virtual PRBool CStartToken::IsWellFormed ( void   )  const [inline, virtual]

For tokens who care, this can tell us whether the token is well formed or not.

gess 8/30/00

Returns:
PR_FALSE; subclasses MUST override if they care.

Reimplemented from CToken.

virtual void CStartToken::SetContainerInfo ( eContainerInfo  aContainerInfo  )  [inline, virtual]

Reimplemented from CHTMLToken.

virtual void CStartToken::SetEmpty ( PRBool  aValue  )  [virtual]

If aValue is TRUE then the token represents a short-hand tag.

Reimplemented from CToken.

virtual size_t CStartToken::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: