File indexing completed on 2024-04-28 03:53:03
0001 /* -*- C++ -*- 0002 SPDX-FileCopyrightText: 1998 Netscape Communications Corporation <developer@mozilla.org> 0003 0004 SPDX-License-Identifier: MIT 0005 */ 0006 0007 #ifndef nsMBCSGroupProber_h__ 0008 #define nsMBCSGroupProber_h__ 0009 0010 #include "UnicodeGroupProber.h" 0011 #include "nsBig5Prober.h" 0012 #include "nsEUCJPProber.h" 0013 #include "nsEUCKRProber.h" 0014 #include "nsGB2312Prober.h" 0015 #include "nsSJISProber.h" 0016 0017 #define NUM_OF_PROBERS 6 0018 namespace kencodingprober 0019 { 0020 class KCODECS_NO_EXPORT nsMBCSGroupProber : public nsCharSetProber 0021 { 0022 public: 0023 nsMBCSGroupProber(); 0024 ~nsMBCSGroupProber() override; 0025 nsProbingState HandleData(const char *aBuf, unsigned int aLen) override; 0026 const char *GetCharSetName() override; 0027 nsProbingState GetState(void) override 0028 { 0029 return mState; 0030 } 0031 void Reset(void) override; 0032 float GetConfidence(void) override; 0033 void SetOpion() override 0034 { 0035 } 0036 0037 #ifdef DEBUG_PROBE 0038 void DumpStatus() override; 0039 #endif 0040 0041 protected: 0042 nsProbingState mState; 0043 nsCharSetProber *mProbers[NUM_OF_PROBERS]; 0044 bool mIsActive[NUM_OF_PROBERS]; 0045 int mBestGuess; 0046 unsigned int mActiveNum; 0047 }; 0048 } 0049 0050 #endif /* nsMBCSGroupProber_h__ */