Back to index

lightning-sunbird  0.9+nobinonly
Public Types | Public Member Functions
nsIUGenDetailCategory Class Reference

#include <nsIUGenDetailCategory.h>

Inheritance diagram for nsIUGenDetailCategory:
Inheritance graph
[legend]
Collaboration diagram for nsIUGenDetailCategory:
Collaboration graph
[legend]

List of all members.

Public Types

enum  nsUGDC {
  kUGDC_M = (kUGenCategory_Mark << 4) | 0, kUGDC_Mn = (kUGenCategory_Mark << 4) | 1, kUGDC_Mc = (kUGenCategory_Mark << 4) | 2, kUGDC_Me = (kUGenCategory_Mark << 4) | 3,
  kUGDC_N = (kUGenCategory_Number << 4) | 0, kUGDC_Nd = (kUGenCategory_Number << 4) | 1, kUGDC_Nl = (kUGenCategory_Number << 4) | 2, kUGDC_No = (kUGenCategory_Number << 4) | 3,
  kUGDC_Z = (kUGenCategory_Separator << 4) | 0, kUGDC_Zs = (kUGenCategory_Separator << 4) | 1, kUGDC_Zl = (kUGenCategory_Separator << 4) | 2, kUGDC_Zp = (kUGenCategory_Separator << 4) | 3,
  kUGDC_C = (kUGenCategory_Other << 4) | 0, kUGDC_Cc = (kUGenCategory_Other << 4) | 1, kUGDC_Cf = (kUGenCategory_Other << 4) | 2, kUGDC_Cs = (kUGenCategory_Other << 4) | 3,
  kUGDC_Co = (kUGenCategory_Other << 4) | 4, kUGDC_Cn = (kUGenCategory_Other << 4) | 5, kUGDC_L = (kUGenCategory_Letter << 4) | 0, kUGDC_Lu = (kUGenCategory_Letter << 4) | 1,
  kUGDC_Ll = (kUGenCategory_Letter << 4) | 2, kUGDC_Lt = (kUGenCategory_Letter << 4) | 3, kUGDC_Lm = (kUGenCategory_Letter << 4) | 4, kUGDC_Lo = (kUGenCategory_Letter << 4) | 5,
  kUGDC_P = (kUGenCategory_Punctuation << 4) | 0, kUGDC_Pc = (kUGenCategory_Punctuation << 4) | 1, kUGDC_Pd = (kUGenCategory_Punctuation << 4) | 2, kUGDC_Ps = (kUGenCategory_Punctuation << 4) | 3,
  kUGDC_Pe = (kUGenCategory_Punctuation << 4) | 4, kUGDC_Pi = (kUGenCategory_Punctuation << 4) | 5, kUGDC_Pf = (kUGenCategory_Punctuation << 4) | 6, kUGDC_Po = (kUGenCategory_Punctuation << 4) | 7,
  kUGDC_S = (kUGenCategory_Symbol << 4) | 0, kUGDC_Sm = (kUGenCategory_Symbol << 4) | 1, kUGDC_Sc = (kUGenCategory_Symbol << 4) | 2, kUGDC_Sk = (kUGenCategory_Symbol << 4) | 3,
  kUGDC_So = (kUGenCategory_Symbol << 4) | 4
}
 Read ftp://ftp.unicode.org/Public/UNIDATA/ReadMe-Latest.txt section GENERAL CATEGORY for the detail defintation of the following categories. More...
enum  nsUGDC_Detail {
  kUGDC_DetailNone = 0, kUGDC_DetailMark = ( 1 << 0), kUGDC_DetailNumber = ( 1 << 1), kUGDC_DetailSeparator = ( 1 << 2),
  kUGDC_DetailOther = ( 1 << 3), kUGDC_DetailLetter = ( 1 << 4), kUGDC_DetailPunctuation = ( 1 << 5), kUGDC_DetailSymbol = ( 1 << 6),
  kUGDC_DetailNormative, kUGDC_DetailAll
}
 Sometimes, we want the Get method only return detail in certain area. More...

Public Member Functions

NS_IMETHOD Get (PRUnichar aChar, nsUGDC_Detail aDetailSpec, nsUGDC *oResult)=0
 Give a Unichar, return a nsUGDC.
NS_IMETHOD Is (PRUnichar aChar, nsUGDC aDetailCategory, PRBool *oResult)=0
 Give a Unichar, and a nsUGenDetailCategory, return PR_TRUE if the Unichar is in that category, return PR_FALSE, otherwise.

Detailed Description

Definition at line 51 of file nsIUGenDetailCategory.h.


Member Enumeration Documentation

Read ftp://ftp.unicode.org/Public/UNIDATA/ReadMe-Latest.txt section GENERAL CATEGORY for the detail defintation of the following categories.

Enumerator:
kUGDC_M 
kUGDC_Mn 
kUGDC_Mc 
kUGDC_Me 
kUGDC_N 
kUGDC_Nd 
kUGDC_Nl 
kUGDC_No 
kUGDC_Z 
kUGDC_Zs 
kUGDC_Zl 
kUGDC_Zp 
kUGDC_C 
kUGDC_Cc 
kUGDC_Cf 
kUGDC_Cs 
kUGDC_Co 
kUGDC_Cn 
kUGDC_L 
kUGDC_Lu 
kUGDC_Ll 
kUGDC_Lt 
kUGDC_Lm 
kUGDC_Lo 
kUGDC_P 
kUGDC_Pc 
kUGDC_Pd 
kUGDC_Ps 
kUGDC_Pe 
kUGDC_Pi 
kUGDC_Pf 
kUGDC_Po 
kUGDC_S 
kUGDC_Sm 
kUGDC_Sc 
kUGDC_Sk 
kUGDC_So 

Definition at line 62 of file nsIUGenDetailCategory.h.

                {
              
     kUGDC_M  = (kUGenCategory_Mark << 4) | 0, // Mark- return only when kUGDC_DetailMark bit is clear
     kUGDC_Mn = (kUGenCategory_Mark << 4) | 1, // Mark, Non-Spacing - return only when kUGDC_DetailMark bit is set
     kUGDC_Mc = (kUGenCategory_Mark << 4) | 2, // Mark, Spacing Combining - return only when kUGDC_DetailMark bit is set
     kUGDC_Me = (kUGenCategory_Mark << 4) | 3, // Mark, Enclosing - return only when kUGDC_DetailMark bit is set

     kUGDC_N  = (kUGenCategory_Number << 4) | 0, // Number- return only when kUGDC_DetailNumber bit is clear
     kUGDC_Nd = (kUGenCategory_Number << 4) | 1, // Number, Decimal Digit - return only when kUGDC_DetailNumber bit is set
     kUGDC_Nl = (kUGenCategory_Number << 4) | 2, // Number, Letter - return only when kUGDC_DetailNumber bit is set
     kUGDC_No = (kUGenCategory_Number << 4) | 3, // Number, Other - return only when kUGDC_DetailNumber bit is set

     kUGDC_Z  = (kUGenCategory_Separator << 4) | 0, // Separator- return only when kUGDC_DetailSeparator bit is clear
     kUGDC_Zs = (kUGenCategory_Separator << 4) | 1, // Separator, Space - return only when kUGDC_DetailSeparator bit is set
     kUGDC_Zl = (kUGenCategory_Separator << 4) | 2, // Separator, Line - return only when kUGDC_DetailSeparator bit is set
     kUGDC_Zp = (kUGenCategory_Separator << 4) | 3, // Separator, Paragraph - return only when kUGDC_DetailSeparator bit is set

     kUGDC_C  = (kUGenCategory_Other << 4) | 0, // Other- return only when kUGDC_DetailOther bit is clear
     kUGDC_Cc = (kUGenCategory_Other << 4) | 1, // Other, Control - return only when kUGDC_DetailOther bit is set
     kUGDC_Cf = (kUGenCategory_Other << 4) | 2, // Other, Format - return only when kUGDC_DetailOther bit is set
     kUGDC_Cs = (kUGenCategory_Other << 4) | 3, // Other, Surrogate - return only when kUGDC_DetailOther bit is set
     kUGDC_Co = (kUGenCategory_Other << 4) | 4, // Other, Private Use - return only when kUGDC_DetailOther bit is set
     kUGDC_Cn = (kUGenCategory_Other << 4) | 5, // Other, Not Assigned - return only when kUGDC_DetailOther bit is set

     kUGDC_L  = (kUGenCategory_Letter << 4) | 0, // Letter- return only when kUGDC_DetailLetter bit is clear
     kUGDC_Lu = (kUGenCategory_Letter << 4) | 1, // Letter, Uppercase - return only when kUGDC_DetailLetter bit is set
     kUGDC_Ll = (kUGenCategory_Letter << 4) | 2, // Letter, Lowercase - return only when kUGDC_DetailLetter bit is set
     kUGDC_Lt = (kUGenCategory_Letter << 4) | 3, // Letter, Titlecase - return only when kUGDC_DetailLetter bit is set
     kUGDC_Lm = (kUGenCategory_Letter << 4) | 4, // Letter, Modifier - return only when kUGDC_DetailLetter bit is set
     kUGDC_Lo = (kUGenCategory_Letter << 4) | 5, // Letter, Other - return only when kUGDC_DetailLetter bit is set

     kUGDC_P  = (kUGenCategory_Punctuation << 4) | 0, // Punctuation- return only when kUGDC_DetailPunctuation bit is clear
     kUGDC_Pc = (kUGenCategory_Punctuation << 4) | 1, // Punctuation, Connector - return only when kUGDC_DetailPunctuation bit is set
     kUGDC_Pd = (kUGenCategory_Punctuation << 4) | 2, // Punctuation, Dash - return only when kUGDC_DetailPunctuation bit is set
     kUGDC_Ps = (kUGenCategory_Punctuation << 4) | 3, // Punctuation, Open - return only when kUGDC_DetailPunctuation bit is set
     kUGDC_Pe = (kUGenCategory_Punctuation << 4) | 4, // Punctuation, Close - return only when kUGDC_DetailPunctuation bit is set
     kUGDC_Pi = (kUGenCategory_Punctuation << 4) | 5, // Punctuation, Initial quote - return only when kUGDC_DetailPunctuation bit is set
     kUGDC_Pf = (kUGenCategory_Punctuation << 4) | 6, // Punctuation, Final quote - return only when kUGDC_DetailPunctuation bit is set
     kUGDC_Po = (kUGenCategory_Punctuation << 4) | 7, // Punctuation, Other - return only when kUGDC_DetailPunctuation bit is set

     kUGDC_S  = (kUGenCategory_Symbol << 4) | 0, // Symbol- return only when kUGDC_DetailSymbol bit is clear
     kUGDC_Sm = (kUGenCategory_Symbol << 4) | 1, // Symbol, Math - return only when kUGDC_DetailSymbol bit is set
     kUGDC_Sc = (kUGenCategory_Symbol << 4) | 2, // Symbol, Currency - return only when kUGDC_DetailSymbol bit is set
     kUGDC_Sk = (kUGenCategory_Symbol << 4) | 3, // Symbol, Modifier - return only when kUGDC_DetailSymbol bit is set
     kUGDC_So = (kUGenCategory_Symbol << 4) | 4, // Symbol, Other - return only when kUGDC_DetailSymbol bit is set
   } nsUGDC;

Sometimes, we want the Get method only return detail in certain area.

It help to ignore unnecessary detail to improve performance

Enumerator:
kUGDC_DetailNone 
kUGDC_DetailMark 
kUGDC_DetailNumber 
kUGDC_DetailSeparator 
kUGDC_DetailOther 
kUGDC_DetailLetter 
kUGDC_DetailPunctuation 
kUGDC_DetailSymbol 
kUGDC_DetailNormative 
kUGDC_DetailAll 

Definition at line 113 of file nsIUGenDetailCategory.h.


Member Function Documentation

NS_IMETHOD nsIUGenDetailCategory::Get ( PRUnichar  aChar,
nsUGDC_Detail  aDetailSpec,
nsUGDC oResult 
) [pure virtual]

Give a Unichar, return a nsUGDC.

NS_IMETHOD nsIUGenDetailCategory::Is ( PRUnichar  aChar,
nsUGDC  aDetailCategory,
PRBool oResult 
) [pure virtual]

Give a Unichar, and a nsUGenDetailCategory, return PR_TRUE if the Unichar is in that category, return PR_FALSE, otherwise.


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