SJISDistributionAnalysis Class Reference

#include <CharDistribution.h>

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

Public Member Functions

 SJISDistributionAnalysis ()

Protected Member Functions

PRInt32 GetOrder (const char *str)

Detailed Description

Definition at line 196 of file CharDistribution.h.


Constructor & Destructor Documentation

SJISDistributionAnalysis::SJISDistributionAnalysis (  ) 

Definition at line 98 of file CharDistribution.cpp.

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

00099 {
00100   mCharToFreqOrder = JISCharToFreqOrder;
00101   mTableSize = JIS_TABLE_SIZE;
00102   mTypicalDistributionRatio = JIS_TYPICAL_DISTRIBUTION_RATIO;
00103 }


Member Function Documentation

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

Reimplemented from CharDistributionAnalysis.

Definition at line 205 of file CharDistribution.h.

00206   { 
00207     PRInt32 order;
00208     if ((unsigned char)*str >= (unsigned char)0x81 && (unsigned char)*str <= (unsigned char)0x9f)  
00209       order = 188 * ((unsigned char)str[0]-(unsigned char)0x81);
00210     else if ((unsigned char)*str >= (unsigned char)0xe0 && (unsigned char)*str <= (unsigned char)0xef)  
00211       order = 188 * ((unsigned char)str[0]-(unsigned char)0xe0 + 31);
00212     else
00213       return -1;
00214     order += (unsigned char)*(str+1) - 0x40;
00215     if ((unsigned char)str[1] > (unsigned char)0x7f)
00216       order--;
00217     return order;
00218   };


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