KCodecs

nsEUCKRProber.h
1/* -*- C++ -*-
2 SPDX-FileCopyrightText: 1998 Netscape Communications Corporation <developer@mozilla.org>
3
4 SPDX-License-Identifier: MIT
5*/
6
7#ifndef nsEUCKRProber_h__
8#define nsEUCKRProber_h__
9
10#include "CharDistribution.h"
11#include "nsCharSetProber.h"
12#include "nsCodingStateMachine.h"
13namespace kencodingprober
14{
15class KCODECS_NO_EXPORT nsEUCKRProber : public nsCharSetProber
16{
17public:
18 nsEUCKRProber(void)
19 {
20 mCodingSM = new nsCodingStateMachine(&EUCKRSMModel);
21 Reset();
22 }
23 ~nsEUCKRProber(void) override
24 {
25 delete mCodingSM;
26 }
27 nsProbingState HandleData(const char *aBuf, unsigned int aLen) override;
28 const char *GetCharSetName() override
29 {
30 return "EUC-KR";
31 }
32 nsProbingState GetState(void) override
33 {
34 return mState;
35 }
36 void Reset(void) override;
37 float GetConfidence(void) override;
38 void SetOpion() override
39 {
40 }
41
42protected:
43 void GetDistribution(unsigned int aCharLen, const char *aStr);
44
45 nsCodingStateMachine *mCodingSM;
46 nsProbingState mState;
47
48 // EUCKRContextAnalysis mContextAnalyser;
49 EUCKRDistributionAnalysis mDistributionAnalyser;
50 char mLastChar[2];
51};
52}
53
54#endif /* nsEUCKRProber_h__ */
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:20:47 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.