SNAP Library 2.1, User Reference  2013-09-25 10:47:25
SNAP, a general purpose, high performance system for analysis and manipulation of large networks
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
TUniChInfo Class Reference

#include <unicode.h>

List of all members.

Public Types

enum  {
  ccStarter = 0, ccOverlaysAndInterior = 1, ccNuktas = 7, ccHiraganaKatakanaVoicingMarks = 8,
  ccViramas = 9, ccFixedPositionStart = 10, ccFixedPositionEnd = 199, ccBelowLeftAttached = 200,
  ccBelowAttached = 202, ccBelowRightAttached = 204, ccLeftAttached = 208, ccRightAttached = 210,
  ccAboveLeftAttached = 212, ccAboveAttached = 214, ccAboveRightAttached = 216, ccBelowLeft = 218,
  ccBelow = 220, ccBelowRight = 222, ccLeft = 224, ccRight = 226,
  ccAboveLeft = 228, ccAbove = 230, ccAboveRight = 232, ccDoubleBelow = 233,
  ccDoubleAbove = 234, ccBelowIotaSubscript = 240, ccInvalid = 255
}

Public Member Functions

void InitAfterLoad ()
void SetCatAndSubCat (const TUniChSubCategory catAndSubCat)
void Save (TSOut &SOut) const
void Load (TSIn &SIn)
 TUniChInfo (TSIn &SIn)
 TUniChInfo ()
bool IsDcpFlag (const TUniChFlags flag) const
void ClrDcpFlags ()
void SetDcpFlag (const TUniChFlags flag)
bool IsAlphabetic () const
bool IsUppercase () const
bool IsLowercase () const
bool IsMath () const
bool IsDefaultIgnorable () const
bool IsGraphemeBase () const
bool IsGraphemeExtend () const
bool IsIdStart () const
bool IsIdContinue () const
bool IsXidStart () const
bool IsXidContinue () const
bool IsProperty (const TUniChProperties flag) const
void SetProperty (const TUniChProperties flag)
bool IsAsciiHexDigit () const
bool IsBidiControl () const
bool IsDash () const
bool IsDeprecated () const
bool IsDiacritic () const
bool IsExtender () const
bool IsGraphemeLink () const
bool IsHexDigit () const
bool IsHyphen () const
bool IsIdeographic () const
bool IsJoinControl () const
bool IsLogicalOrderException () const
bool IsNoncharacter () const
bool IsQuotationMark () const
bool IsSoftDotted () const
bool IsSTerminal () const
bool IsTerminalPunctuation () const
bool IsVariationSelector () const
bool IsWhiteSpace () const
bool IsPropertyX (const TUniChPropertiesX flag) const
void SetPropertyX (const TUniChPropertiesX flag)
bool IsCompositionExclusion () const
bool IsCompatibilityDecomposition () const
bool IsWbFlag (const TUniChFlags flag) const
void ClrWbAndSbFlags ()
void SetWbFlag (const TUniChFlags flag)
int GetWbFlags () const
bool IsWbFormat () const
TStr GetWbFlagsStr () const
bool IsSbFlag (const TUniChFlags flag) const
void SetSbFlag (const TUniChFlags flag)
int GetSbFlags () const
bool IsSbFormat () const
TStr GetSbFlagsStr () const
bool IsSbSep () const
bool IsGbExtend () const
bool IsCased () const
TUniChCategory GetCat () const
TUniChSubCategory GetSubCat () const
bool IsCurrency () const
bool IsPrivateUse () const
bool IsSurrogate () const

Static Public Member Functions

static ushort GetLineBreakCode (char c1, char c2)
static void LoadUShort (TSIn &SIn, ushort &u)
static void LoadSChar (TSIn &SIn, signed char &u)
static void SaveUShort (TSOut &SOut, ushort u)
static void SaveSChar (TSOut &SOut, signed char u)
static TStr GetWbFlagsStr (const int flags)
static TStr GetSbFlagsStr (const int flags)
static bool IsValidSubCat (const char chCat, const char chSubCat)

Public Attributes

char chCat
char chSubCat
uchar combClass
TUniChCategory cat
TUniChSubCategory subCat
signed char script
int simpleUpperCaseMapping
int simpleLowerCaseMapping
int simpleTitleCaseMapping
int decompOffset
int nameOffset
int flags
int properties
int propertiesX
ushort lineBreak

Static Public Attributes

static const ushort LineBreak_Unknown = TUniChInfo::GetLineBreakCode('X', 'X')
static const ushort LineBreak_ComplexContext = TUniChInfo::GetLineBreakCode('S', 'A')
static const ushort LineBreak_Numeric = TUniChInfo::GetLineBreakCode('N', 'U')
static const ushort LineBreak_InfixNumeric = TUniChInfo::GetLineBreakCode('I', 'S')
static const ushort LineBreak_Quotation = TUniChInfo::GetLineBreakCode('Q', 'U')

Friends

class TUniChDb

Detailed Description

Definition at line 985 of file unicode.h.


Member Enumeration Documentation

anonymous enum
Enumerator:
ccStarter 
ccOverlaysAndInterior 
ccNuktas 
ccHiraganaKatakanaVoicingMarks 
ccViramas 
ccFixedPositionStart 
ccFixedPositionEnd 
ccBelowLeftAttached 
ccBelowAttached 
ccBelowRightAttached 
ccLeftAttached 
ccRightAttached 
ccAboveLeftAttached 
ccAboveAttached 
ccAboveRightAttached 
ccBelowLeft 
ccBelow 
ccBelowRight 
ccLeft 
ccRight 
ccAboveLeft 
ccAbove 
ccAboveRight 
ccDoubleBelow 
ccDoubleAbove 
ccBelowIotaSubscript 
ccInvalid 

Definition at line 988 of file unicode.h.

             { // combining classes (for 'combClass'); from UnicodeData.txt
                ccStarter = 0, // 0: Spacing, split, enclosing, reordrant, and Tibetan subjoined
                ccOverlaysAndInterior = 1,
                ccNuktas = 7,
                ccHiraganaKatakanaVoicingMarks = 8,
                ccViramas = 9,
                ccFixedPositionStart = 10, // Start of fixed position classes
                ccFixedPositionEnd = 199, // End of fixed position classes
                ccBelowLeftAttached = 200,
                ccBelowAttached = 202,
                ccBelowRightAttached = 204,
                ccLeftAttached = 208, // Left attached (reordrant around single base character)
                ccRightAttached = 210,
                ccAboveLeftAttached = 212,
                ccAboveAttached = 214,
                ccAboveRightAttached = 216,
                ccBelowLeft = 218,
                ccBelow = 220,
                ccBelowRight = 222,
                ccLeft = 224, // Left (reordrant around single base character)
                ccRight = 226,
                ccAboveLeft = 228,
                ccAbove = 230,
                ccAboveRight = 232,
                ccDoubleBelow = 233,
                ccDoubleAbove = 234,
                ccBelowIotaSubscript = 240, // Below (iota subscript)
                ccInvalid = 255 // not defined by Unicode
        };

Constructor & Destructor Documentation

TUniChInfo::TUniChInfo ( TSIn SIn) [inline, explicit]

Definition at line 1061 of file unicode.h.

{ Load(SIn); }
TUniChInfo::TUniChInfo ( ) [inline]

Definition at line 1062 of file unicode.h.


Member Function Documentation

void TUniChInfo::ClrDcpFlags ( ) [inline]

Definition at line 1069 of file unicode.h.

void TUniChInfo::ClrWbAndSbFlags ( ) [inline]

Definition at line 1116 of file unicode.h.

TUniChCategory TUniChInfo::GetCat ( ) const [inline]

Definition at line 1145 of file unicode.h.

{ return (TUniChCategory) cat; }
static ushort TUniChInfo::GetLineBreakCode ( char  c1,
char  c2 
) [inline, static]

Definition at line 1031 of file unicode.h.

{ return ((static_cast<ushort>(static_cast<uchar>(c1)) & 0xff) << 8) | ((static_cast<ushort>(static_cast<uchar>(c2)) & 0xff)); }
int TUniChInfo::GetSbFlags ( ) const [inline]

Definition at line 1128 of file unicode.h.

{ return flags & ucfSbMask; }
TStr TUniChInfo::GetSbFlagsStr ( ) const [inline]

Definition at line 1130 of file unicode.h.

{ return GetSbFlagsStr(GetSbFlags()); }
static TStr TUniChInfo::GetSbFlagsStr ( const int  flags) [inline, static]

Definition at line 1131 of file unicode.h.

                                                   { return TStr("") + (flags & ucfSbSep ? "S" : "") +
                (flags & ucfSbFormat ? "F" : "") + (flags & ucfSbSp ? "_" : "") + (flags & ucfSbLower ? "L" : "") +
                (flags & ucfSbUpper ? "U" : "") + (flags & ucfSbOLetter ? "O" : "") + (flags & ucfSbNumeric ? "N" : "") +
                (flags & ucfSbATerm ? "A" : "") + (flags & ucfSbSTerm ? "T" : "") + (flags & ucfSbClose ? "C" : ""); }

Definition at line 1146 of file unicode.h.

{ return (TUniChSubCategory) subCat; }
int TUniChInfo::GetWbFlags ( ) const [inline]

Definition at line 1118 of file unicode.h.

{ return flags & ucfWbMask; }
TStr TUniChInfo::GetWbFlagsStr ( ) const [inline]

Definition at line 1120 of file unicode.h.

{ return GetWbFlagsStr(GetWbFlags()); }
static TStr TUniChInfo::GetWbFlagsStr ( const int  flags) [inline, static]

Definition at line 1121 of file unicode.h.

                                                   { return TStr("") + (flags & ucfWbALetter ? "A" : "") +
                (flags & ucfWbFormat ? "F" : "") + (flags & ucfWbKatakana ? "K" : "") + (flags & ucfWbMidLetter ? "M" : "") +
                (flags & ucfWbMidNum ? "m" : "") + (flags & ucfWbNumeric ? "N" : "") + (flags & ucfWbExtendNumLet ? "E" : ""); }
void TUniChInfo::InitAfterLoad ( ) [inline]

Definition at line 1035 of file unicode.h.

                             {
                cat = (TUniChCategory) chCat;
                subCat = (TUniChSubCategory) (((static_cast<int>(static_cast<uchar>(chCat)) & 0xff) << 8) | (static_cast<int>(static_cast<uchar>(chSubCat)) & 0xff)); }
bool TUniChInfo::IsAlphabetic ( ) const [inline]

Definition at line 1071 of file unicode.h.

bool TUniChInfo::IsAsciiHexDigit ( ) const [inline]

Definition at line 1086 of file unicode.h.

bool TUniChInfo::IsBidiControl ( ) const [inline]

Definition at line 1087 of file unicode.h.

bool TUniChInfo::IsCased ( ) const [inline]

Definition at line 1142 of file unicode.h.

{ return IsUppercase() || IsLowercase() || (subCat == ucLetterTitlecase); }

Definition at line 1112 of file unicode.h.

bool TUniChInfo::IsCompositionExclusion ( ) const [inline]

Definition at line 1111 of file unicode.h.

bool TUniChInfo::IsCurrency ( ) const [inline]

Definition at line 1157 of file unicode.h.

{ return subCat == ucSymbolCurrency; }
bool TUniChInfo::IsDash ( ) const [inline]

Definition at line 1088 of file unicode.h.

{ return IsProperty(ucfPrDash); }
bool TUniChInfo::IsDcpFlag ( const TUniChFlags  flag) const [inline]

Definition at line 1068 of file unicode.h.

{ Assert((flag & ucfDcpMask) == flag); return (flags & flag) == flag; }
bool TUniChInfo::IsDefaultIgnorable ( ) const [inline]

Definition at line 1075 of file unicode.h.

bool TUniChInfo::IsDeprecated ( ) const [inline]

Definition at line 1089 of file unicode.h.

bool TUniChInfo::IsDiacritic ( ) const [inline]

Definition at line 1090 of file unicode.h.

bool TUniChInfo::IsExtender ( ) const [inline]

Definition at line 1091 of file unicode.h.

bool TUniChInfo::IsGbExtend ( ) const [inline]

Definition at line 1139 of file unicode.h.

{ return IsGraphemeExtend(); }
bool TUniChInfo::IsGraphemeBase ( ) const [inline]

Definition at line 1076 of file unicode.h.

bool TUniChInfo::IsGraphemeExtend ( ) const [inline]

Definition at line 1077 of file unicode.h.

bool TUniChInfo::IsGraphemeLink ( ) const [inline]

Definition at line 1092 of file unicode.h.

bool TUniChInfo::IsHexDigit ( ) const [inline]

Definition at line 1093 of file unicode.h.

bool TUniChInfo::IsHyphen ( ) const [inline]

Definition at line 1094 of file unicode.h.

{ return IsProperty(ucfPrHyphen); }
bool TUniChInfo::IsIdContinue ( ) const [inline]

Definition at line 1079 of file unicode.h.

bool TUniChInfo::IsIdeographic ( ) const [inline]

Definition at line 1095 of file unicode.h.

bool TUniChInfo::IsIdStart ( ) const [inline]

Definition at line 1078 of file unicode.h.

{ return IsDcpFlag(ucfDcpIdStart); }
bool TUniChInfo::IsJoinControl ( ) const [inline]

Definition at line 1096 of file unicode.h.

bool TUniChInfo::IsLogicalOrderException ( ) const [inline]

Definition at line 1097 of file unicode.h.

bool TUniChInfo::IsLowercase ( ) const [inline]

Definition at line 1073 of file unicode.h.

bool TUniChInfo::IsMath ( ) const [inline]

Definition at line 1074 of file unicode.h.

{ return IsDcpFlag(ucfDcpMath); }
bool TUniChInfo::IsNoncharacter ( ) const [inline]

Definition at line 1098 of file unicode.h.

bool TUniChInfo::IsPrivateUse ( ) const [inline]

Definition at line 1161 of file unicode.h.

{ return subCat == ucOtherPrivateUse; }
bool TUniChInfo::IsProperty ( const TUniChProperties  flag) const [inline]

Definition at line 1084 of file unicode.h.

{ return (properties & flag) == flag; }
bool TUniChInfo::IsPropertyX ( const TUniChPropertiesX  flag) const [inline]

Definition at line 1107 of file unicode.h.

{ return (propertiesX & flag) == flag; }
bool TUniChInfo::IsQuotationMark ( ) const [inline]

Definition at line 1099 of file unicode.h.

bool TUniChInfo::IsSbFlag ( const TUniChFlags  flag) const [inline]

Definition at line 1126 of file unicode.h.

{ Assert((flag & ucfSbMask) == flag); return (flags & flag) == flag; }
bool TUniChInfo::IsSbFormat ( ) const [inline]

Definition at line 1129 of file unicode.h.

{ return IsSbFlag(ucfSbFormat); }
bool TUniChInfo::IsSbSep ( ) const [inline]

Definition at line 1136 of file unicode.h.

{ return (flags & ucfSbSep) == ucfSbSep; }
bool TUniChInfo::IsSoftDotted ( ) const [inline]

Definition at line 1100 of file unicode.h.

bool TUniChInfo::IsSTerminal ( ) const [inline]

Definition at line 1101 of file unicode.h.

{ return IsProperty(ucfPrSTerm); }
bool TUniChInfo::IsSurrogate ( ) const [inline]

Definition at line 1162 of file unicode.h.

{ return subCat == ucOtherSurrogate; }
bool TUniChInfo::IsTerminalPunctuation ( ) const [inline]

Definition at line 1102 of file unicode.h.

bool TUniChInfo::IsUppercase ( ) const [inline]

Definition at line 1072 of file unicode.h.

static bool TUniChInfo::IsValidSubCat ( const char  chCat,
const char  chSubCat 
) [inline, static]

Definition at line 1164 of file unicode.h.

                                                                                {
                static const char s[] = "LuLlLtLmLoMnMcMeNdNlNoPcPdPsPePiPfPoSmScSkSoZsZlZpCcCfCsCoCn";
                for (const char *p = s; *p; p += 2)
                        if (chCat == p[0] && chSubCat == p[1]) return true;
                return false; }
bool TUniChInfo::IsVariationSelector ( ) const [inline]

Definition at line 1103 of file unicode.h.

bool TUniChInfo::IsWbFlag ( const TUniChFlags  flag) const [inline]

Definition at line 1115 of file unicode.h.

{ Assert((flag & ucfWbMask) == flag); return (flags & flag) == flag; }
bool TUniChInfo::IsWbFormat ( ) const [inline]

Definition at line 1119 of file unicode.h.

{ return IsWbFlag(ucfWbFormat); }
bool TUniChInfo::IsWhiteSpace ( ) const [inline]

Definition at line 1104 of file unicode.h.

bool TUniChInfo::IsXidContinue ( ) const [inline]

Definition at line 1081 of file unicode.h.

bool TUniChInfo::IsXidStart ( ) const [inline]

Definition at line 1080 of file unicode.h.

static void TUniChInfo::LoadSChar ( TSIn SIn,
signed char &  u 
) [inline, static]

Definition at line 1046 of file unicode.h.

{ SIn.LoadBf(&u, sizeof(u)); }
static void TUniChInfo::LoadUShort ( TSIn SIn,
ushort u 
) [inline, static]

Definition at line 1045 of file unicode.h.

{ SIn.LoadBf(&u, sizeof(u)); }
void TUniChInfo::Save ( TSOut SOut) const [inline]

Definition at line 1051 of file unicode.h.

static void TUniChInfo::SaveSChar ( TSOut SOut,
signed char  u 
) [inline, static]

Definition at line 1048 of file unicode.h.

{ SOut.SaveBf(&u, sizeof(u)); }
static void TUniChInfo::SaveUShort ( TSOut SOut,
ushort  u 
) [inline, static]

Definition at line 1047 of file unicode.h.

{ SOut.SaveBf(&u, sizeof(u)); }
void TUniChInfo::SetCatAndSubCat ( const TUniChSubCategory  catAndSubCat) [inline]

Definition at line 1038 of file unicode.h.

                                                                   {
                cat = (TUniChCategory) ((int(catAndSubCat) >> 8) & 0xff);
                subCat = catAndSubCat;
                chCat = (char) cat; chSubCat = (char) (int(subCat) & 0xff); }
void TUniChInfo::SetDcpFlag ( const TUniChFlags  flag) [inline]

Definition at line 1070 of file unicode.h.

{ Assert((flag & ucfDcpMask) == flag); flags |= flag; }
void TUniChInfo::SetProperty ( const TUniChProperties  flag) [inline]

Definition at line 1085 of file unicode.h.

{ properties |= flag; }
void TUniChInfo::SetPropertyX ( const TUniChPropertiesX  flag) [inline]

Definition at line 1108 of file unicode.h.

{ propertiesX |= flag; }
void TUniChInfo::SetSbFlag ( const TUniChFlags  flag) [inline]

Definition at line 1127 of file unicode.h.

{ Assert((flag & ucfSbMask) == flag); flags |= flag; }
void TUniChInfo::SetWbFlag ( const TUniChFlags  flag) [inline]

Definition at line 1117 of file unicode.h.

{ Assert((flag & ucfWbMask) == flag); flags |= flag; }

Friends And Related Function Documentation

friend class TUniChDb [friend]

Definition at line 1042 of file unicode.h.


Member Data Documentation

Definition at line 1019 of file unicode.h.

Definition at line 1017 of file unicode.h.

Definition at line 1017 of file unicode.h.

Definition at line 1018 of file unicode.h.

Definition at line 1023 of file unicode.h.

Definition at line 1025 of file unicode.h.

Definition at line 1028 of file unicode.h.

Definition at line 1032 of file unicode.h.

Definition at line 1032 of file unicode.h.

Definition at line 1032 of file unicode.h.

Definition at line 1032 of file unicode.h.

Definition at line 1032 of file unicode.h.

Definition at line 1024 of file unicode.h.

Definition at line 1026 of file unicode.h.

Definition at line 1027 of file unicode.h.

signed char TUniChInfo::script

Definition at line 1021 of file unicode.h.

Definition at line 1022 of file unicode.h.

Definition at line 1022 of file unicode.h.

Definition at line 1022 of file unicode.h.

Definition at line 1020 of file unicode.h.


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