KCodecs

JapaneseGroupProber.h
1/* -*- C++ -*-
2 SPDX-FileCopyrightText: 1998 Netscape Communications Corporation <developer@mozilla.org>
3
4 SPDX-License-Identifier: MIT
5*/
6
7#ifndef JAPANESEGROUPPROBER_H
8#define JAPANESEGROUPPROBER_H
9
10#include "UnicodeGroupProber.h"
11#include "nsCharSetProber.h"
12#include "nsEUCJPProber.h"
13#include "nsSJISProber.h"
14
15#define JP_NUM_OF_PROBERS 3
16namespace kencodingprober
17{
18class KCODECS_NO_EXPORT JapaneseGroupProber : public nsCharSetProber
19{
20public:
21 JapaneseGroupProber();
22 ~JapaneseGroupProber() override;
23 nsProbingState HandleData(const char *aBuf, unsigned int aLen) override;
24 const char *GetCharSetName() override;
25 nsProbingState GetState(void) override
26 {
27 return mState;
28 }
29 void Reset(void) override;
30 float GetConfidence(void) override;
31 void SetOpion() override
32 {
33 }
34
35#ifdef DEBUG_PROBE
36 void DumpStatus() override;
37#endif
38
39protected:
40 nsProbingState mState;
41 nsCharSetProber *mProbers[JP_NUM_OF_PROBERS];
42 bool mIsActive[JP_NUM_OF_PROBERS];
43 int mBestGuess;
44 unsigned int mActiveNum;
45};
46}
47#endif /* JAPANESEGROUPPROBER_H */
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 13 2024 11:48:48 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.