GB2312DistributionAnalysis Class Reference

#include <CharDistribution.h>

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

Public Member Functions

 GB2312DistributionAnalysis ()

Protected Member Functions

PRInt32 GetOrder (const char *str)

Detailed Description

Definition at line 158 of file CharDistribution.h.


Constructor & Destructor Documentation

GB2312DistributionAnalysis::GB2312DistributionAnalysis (  ) 

Definition at line 84 of file CharDistribution.cpp.

References CharDistributionAnalysis::mCharToFreqOrder, CharDistributionAnalysis::mTableSize, and CharDistributionAnalysis::mTypicalDistributionRatio.

00085 {
00086   mCharToFreqOrder = GB2312CharToFreqOrder;
00087   mTableSize = GB2312_TABLE_SIZE;
00088   mTypicalDistributionRatio = GB2312_TYPICAL_DISTRIBUTION_RATIO;
00089 }


Member Function Documentation

PRInt32 GB2312DistributionAnalysis::GetOrder ( const char *  str  )  [inline, protected, virtual]

Reimplemented from CharDistributionAnalysis.

Definition at line 167 of file CharDistribution.h.

00168   { if ((unsigned char)*str >= (unsigned char)0xb0 && (unsigned char)str[1] >= (unsigned char)0xa1)  
00169       return 94*((unsigned char)str[0]-(unsigned char)0xb0) + (unsigned char)str[1] - (unsigned char)0xa1;
00170     else
00171       return -1;
00172   };


The documentation for this class was generated from the following files:
Generated by  doxygen 1.6.2-20100208