• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  **********************************************************************
3  *   Copyright (C) 2005-2006, International Business Machines
4  *   Corporation and others.  All Rights Reserved.
5  **********************************************************************
6  */
7 
8 #ifndef __INPUTEXT_H
9 #define __INPUTEXT_H
10 
11 /**
12  * \file
13  * \internal
14  *
15  * This is an internal header for the Character Set Detection code. The
16  * name is probably too generic...
17  */
18 
19 
20 #include "unicode/uobject.h"
21 
22 #if !UCONFIG_NO_CONVERSION
23 
24 U_NAMESPACE_BEGIN
25 
26 class InputText : public UMemory
27 {
28 public:
29     InputText();
30     ~InputText();
31 
32     void setText(const char *in, int32_t len);
33     void setDeclaredEncoding(const char *encoding, int32_t len);
34     UBool isSet() const;
35     void MungeInput(UBool fStripTags);
36 
37     // The text to be checked.  Markup will have been
38     //   removed if appropriate.
39     uint8_t    *fInputBytes;
40     int32_t     fInputLen;          // Length of the byte data in fInputBytes.
41     // byte frequency statistics for the input text.
42     //   Value is percent, not absolute.
43     //   Value is rounded up, so zero really means zero occurences.
44     int16_t  *fByteStats;
45     UBool     fC1Bytes;          // True if any bytes in the range 0x80 - 0x9F are in the input;false by default
46     char     *fDeclaredEncoding;
47 
48     const uint8_t           *fRawInput;     // Original, untouched input bytes.
49     //  If user gave us a byte array, this is it.
50     //  If user gave us a stream, it's read to a
51     //   buffer here.
52     int32_t                  fRawLength;    // Length of data in fRawInput array.
53 
54 };
55 
56 U_NAMESPACE_END
57 
58 #endif
59 #endif /* __INPUTEXT_H */
60