• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdelibs API Reference
  • KDE Home
  • Contact Us
 

KDECore

  • sources
  • kde-4.12
  • kdelibs
  • kdecore
  • localization
  • probers
UnicodeGroupProber.h
Go to the documentation of this file.
1 /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* -*- C++ -*-
3 * Copyright (C) 2008 <wkai@gmail.com>
4 *
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining
7 * a copy of this software and associated documentation files (the
8 * "Software"), to deal in the Software without restriction, including
9 * without limitation the rights to use, copy, modify, merge, publish,
10 * distribute, sublicense, and/or sell copies of the Software, and to
11 * permit persons to whom the Software is furnished to do so, subject to
12 * the following conditions:
13 *
14 * The above copyright notice and this permission notice shall be included
15 * in all copies or substantial portions of the Software.
16 *
17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
21 * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
22 * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
23 * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24 */
25 
26 #ifndef UNICODEGROUPPROBER_H
27 #define UNICODEGROUPPROBER_H
28 
29 #include "nsCharSetProber.h"
30 #include "nsCodingStateMachine.h"
31 
32 #define NUM_OF_UNICODE_CHARSETS 3
33 namespace kencodingprober {
34 class KDE_NO_EXPORT UnicodeGroupProber: public nsCharSetProber {
35 public:
36  UnicodeGroupProber(void);
37  virtual ~UnicodeGroupProber(void);
38  nsProbingState HandleData(const char* aBuf, unsigned int aLen);
39  const char* GetCharSetName() {return mDetectedCharset;};
40  nsProbingState GetState(void) {return mState;};
41  void Reset(void);
42  float GetConfidence();
43  void SetOpion() {};
44 #ifdef DEBUG_PROBE
45  void DumpStatus();
46 #endif
47 
48 protected:
49  void GetDistribution(unsigned int aCharLen, const char* aStr);
50 
51  nsCodingStateMachine* mCodingSM[NUM_OF_UNICODE_CHARSETS] ;
52  unsigned int mActiveSM;
53  nsProbingState mState;
54  const char * mDetectedCharset;
55 };
56 }
57 #endif /* UNICODEGROUPPROBER_H */
58 
KDE_NO_EXPORT
#define KDE_NO_EXPORT
The KDE_NO_EXPORT macro marks the symbol of the given variable to be hidden.
Definition: kdemacros.h.cmake:73
nsCharSetProber.h
kencodingprober::UnicodeGroupProber::GetState
nsProbingState GetState(void)
Definition: UnicodeGroupProber.h:40
kencodingprober::UnicodeGroupProber::mState
nsProbingState mState
Definition: UnicodeGroupProber.h:53
nsCodingStateMachine.h
kencodingprober::UnicodeGroupProber
Definition: UnicodeGroupProber.h:34
kencodingprober::UnicodeGroupProber::GetCharSetName
const char * GetCharSetName()
Definition: UnicodeGroupProber.h:39
kencodingprober::nsCharSetProber
Definition: nsCharSetProber.h:42
kencodingprober::nsProbingState
nsProbingState
Definition: nsCharSetProber.h:34
kencodingprober::UnicodeGroupProber::mDetectedCharset
const char * mDetectedCharset
Definition: UnicodeGroupProber.h:54
kencodingprober::UnicodeGroupProber::mActiveSM
unsigned int mActiveSM
Definition: UnicodeGroupProber.h:52
kencodingprober::UnicodeGroupProber::SetOpion
void SetOpion()
Definition: UnicodeGroupProber.h:43
kencodingprober::nsCodingStateMachine
Definition: nsCodingStateMachine.h:53
NUM_OF_UNICODE_CHARSETS
#define NUM_OF_UNICODE_CHARSETS
Definition: UnicodeGroupProber.h:32
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:47:09 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KDECore

Skip menu "KDECore"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Modules
  • Related Pages

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal