Back to index

lightning-sunbird  0.9+nobinonly
Classes | Defines | Typedefs
nsCharTraits.h File Reference
#include <ctype.h>
#include <string.h>
#include "nscore.h"
#include "nsDebug.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  nsCharTraits< CharT >
struct  nsCharTraits< PRUnichar >
struct  nsCharTraits< char >
struct  nsCharSourceTraits< InputIterator >
struct  nsCharSourceTraits< const char * >
struct  nsCharSourceTraits< const PRUnichar * >
struct  nsCharSinkTraits< OutputIterator >
struct  nsCharSinkTraits< char * >
struct  nsCharSinkTraits< PRUnichar * >

Defines

#define FORCED_CPP_2BYTE_WCHAR_T
#define PLANE1_BASE   PRUint32(0x00010000)
#define IS_HIGH_SURROGATE(u)   ((PRUnichar(u) & 0xFC00) == 0xD800)
#define IS_LOW_SURROGATE(u)   ((PRUnichar(u) & 0xFC00) == 0xDC00)
#define IS_SURROGATE(u)   ((PRUnichar(u) & 0xF800) == 0xD800)
#define SURROGATE_TO_UCS4(h, l)
#define H_SURROGATE(c)
#define L_SURROGATE(c)
#define IS_IN_BMP(ucs)   (PRUint32(ucs) < PLANE1_BASE)
#define UCS2_REPLACEMENT_CHAR   PRUnichar(0xFFFD)
#define UCS_END   PRUint32(0x00110000)
#define IS_VALID_CHAR(c)   ((PRUint32(c) < UCS_END) && !IS_SURROGATE(c))
#define ENSURE_VALID_CHAR(c)   (IS_VALID_CHAR(c) ? (c) : UCS2_REPLACEMENT_CHAR)

Typedefs

typedef PRBool nsCharTraits_bool

Class Documentation

struct nsCharTraits

template<class CharT>
struct nsCharTraits< CharT >

Definition at line 107 of file nsCharTraits.h.


Define Documentation

Definition at line 105 of file nsCharTraits.h.

Definition at line 45 of file nsCharTraits.h.

Value:

Definition at line 95 of file nsCharTraits.h.

#define IS_HIGH_SURROGATE (   u)    ((PRUnichar(u) & 0xFC00) == 0xD800)

Definition at line 79 of file nsCharTraits.h.

#define IS_IN_BMP (   ucs)    (PRUint32(ucs) < PLANE1_BASE)

Definition at line 100 of file nsCharTraits.h.

#define IS_LOW_SURROGATE (   u)    ((PRUnichar(u) & 0xFC00) == 0xDC00)

Definition at line 81 of file nsCharTraits.h.

#define IS_SURROGATE (   u)    ((PRUnichar(u) & 0xF800) == 0xD800)

Definition at line 83 of file nsCharTraits.h.

#define IS_VALID_CHAR (   c)    ((PRUint32(c) < UCS_END) && !IS_SURROGATE(c))

Definition at line 104 of file nsCharTraits.h.

Value:
PRUnichar(PRUnichar((PRUint32(c) - PLANE1_BASE) & 0x03FF) | \
                                 PRUnichar(0xDC00))

Definition at line 97 of file nsCharTraits.h.

#define PLANE1_BASE   PRUint32(0x00010000)

Definition at line 77 of file nsCharTraits.h.

#define SURROGATE_TO_UCS4 (   h,
  l 
)
Value:
(((PRUint32(h) & 0x03FF) << 10) + \
                                 (PRUint32(l) & 0x03FF) + PLANE1_BASE)

Definition at line 90 of file nsCharTraits.h.

Definition at line 101 of file nsCharTraits.h.

#define UCS_END   PRUint32(0x00110000)

Definition at line 103 of file nsCharTraits.h.


Typedef Documentation

Definition at line 73 of file nsCharTraits.h.