Back to index

lightning-sunbird  0.9+nobinonly
Static Public Member Functions | Static Private Member Functions
nsXFormsXPathXMLUtil Class Reference

Miscellaneous utility functions for determining the class of a character, used by nsXFormsXPathScanner. More...

#include <nsXFormsXPathXMLUtil.h>

List of all members.

Static Public Member Functions

static PRBool IsWhitespace (const PRUnichar c)
 Checks if a char is a whitespace.
static PRBool IsDigit (const PRUnichar c)
 Checks of a char is a digit.
static PRBool IsIdeographic (const PRUnichar c)
 Checks if a char is an ideographic.
static PRBool IsLetter (const PRUnichar c)
 Checks if a char is a letter.
static PRBool IsBaseChar (const PRUnichar c)
 Checks if a char is a base char.
static PRBool IsNCNameChar (const PRUnichar c)
 Check is a char matches the first rule of a NCName.
static PRBool IsCombiningChar (const PRUnichar c)
 Check if a char is a combining char.
static PRBool IsExtender (const PRUnichar c)
 Check if a char is an extender.

Static Private Member Functions

static PRBool IsInRange (const PRUnichar *range, const PRUint32 range_length, const PRUnichar c)
 Helper function for public functions.

Detailed Description

Miscellaneous utility functions for determining the class of a character, used by nsXFormsXPathScanner.

Note:
Should be reimplemented and moved to Transformiix

Definition at line 49 of file nsXFormsXPathXMLUtil.h.


Member Function Documentation

Checks if a char is a base char.

Definition at line 115 of file nsXFormsXPathXMLUtil.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Check if a char is a combining char.

Definition at line 128 of file nsXFormsXPathXMLUtil.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Checks of a char is a digit.

Definition at line 97 of file nsXFormsXPathXMLUtil.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Check if a char is an extender.

Definition at line 134 of file nsXFormsXPathXMLUtil.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Checks if a char is an ideographic.

Definition at line 103 of file nsXFormsXPathXMLUtil.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

PRBool nsXFormsXPathXMLUtil::IsInRange ( const PRUnichar range,
const PRUint32  range_length,
const PRUnichar  c 
) [static, private]

Helper function for public functions.

Definition at line 81 of file nsXFormsXPathXMLUtil.cpp.

{
  PRBool inrange = false;
  for (PRUint32 i = 0; !inrange && c >= range[i] && i < range_length; i += 2) {
    inrange = c >= range[i] && c <= range[i + 1];
  }
  return inrange;
}

Here is the caller graph for this function:

Checks if a char is a letter.

Definition at line 109 of file nsXFormsXPathXMLUtil.cpp.

{
  return IsBaseChar(c) || IsIdeographic(c);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Check is a char matches the first rule of a NCName.

Definition at line 122 of file nsXFormsXPathXMLUtil.cpp.

{
  return IsLetter(c) || IsDigit(c) || c == L'.' || c == L'-' || c == L'_' || IsCombiningChar(c) || IsExtender(c);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Checks if a char is a whitespace.

Definition at line 91 of file nsXFormsXPathXMLUtil.cpp.

{
  return (c == L'\r' || c == L' ' || c == L'\n' || c == L'\t');
}

Here is the caller graph for this function:


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