KCodecs

nsLatin1Prober.h
1/* -*- C++ -*-
2 SPDX-FileCopyrightText: 1998 Netscape Communications Corporation <developer@mozilla.org>
3
4 SPDX-License-Identifier: MIT
5*/
6
7#ifndef nsLatin1Prober_h__
8#define nsLatin1Prober_h__
9
10#include "nsCharSetProber.h"
11
12#define FREQ_CAT_NUM 4
13namespace kencodingprober
14{
15class KCODECS_NO_EXPORT nsLatin1Prober : public nsCharSetProber
16{
17public:
18 nsLatin1Prober(void)
19 {
20 Reset();
21 }
22 ~nsLatin1Prober(void) override
23 {
24 }
25 nsProbingState HandleData(const char *aBuf, unsigned int aLen) override;
26 const char *GetCharSetName() override
27 {
28 return "windows-1252";
29 }
30 nsProbingState GetState(void) override
31 {
32 return mState;
33 }
34 void Reset(void) override;
35 float GetConfidence(void) override;
36 void SetOpion() override
37 {
38 }
39
40#ifdef DEBUG_PROBE
41 void DumpStatus() override;
42#endif
43
44protected:
45 nsProbingState mState;
46 char mLastCharClass;
47 unsigned int mFreqCounter[FREQ_CAT_NUM];
48};
49}
50
51#endif /* nsLatin1Prober_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.