Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Private Attributes
txTokenizer Class Reference

#include <txTokenizer.h>

List of all members.

Public Member Functions

 txTokenizer (const nsAFlatString &aSource)
 Creates a new txTokenizer using the given source string.
PRBool hasMoreTokens ()
 Checks if any more tokens are available.
const nsDependentSubstring nextToken ()
 Returns the next token.

Private Attributes

nsAFlatString::const_char_iterator mIter
nsAFlatString::const_char_iterator mEnd

Detailed Description

Definition at line 45 of file txTokenizer.h.


Constructor & Destructor Documentation

txTokenizer::txTokenizer ( const nsAFlatString aSource) [inline]

Creates a new txTokenizer using the given source string.

Definition at line 51 of file txTokenizer.h.

    {
        aSource.BeginReading(mIter);
        aSource.EndReading(mEnd);

        while (mIter != mEnd && XMLUtils::isWhitespace(*mIter)) {
            ++mIter;
        }
    }

Here is the call graph for this function:


Member Function Documentation

Checks if any more tokens are available.

Definition at line 64 of file txTokenizer.h.

    {
        return (mIter != mEnd);
    }

Here is the caller graph for this function:

Returns the next token.

Definition at line 72 of file txTokenizer.h.

    {
        nsAFlatString::const_char_iterator begin = mIter;
        while (mIter != mEnd && !XMLUtils::isWhitespace(*mIter)) {
            ++mIter;
        }
        nsAFlatString::const_char_iterator end = mIter;
        while (mIter != mEnd && XMLUtils::isWhitespace(*mIter)) {
            ++mIter;
        }
        return Substring(begin, end);
    }

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

nsAFlatString::const_char_iterator txTokenizer::mEnd [private]

Definition at line 86 of file txTokenizer.h.

nsAFlatString::const_char_iterator txTokenizer::mIter [private]

Definition at line 86 of file txTokenizer.h.


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