intl/icu/source/i18n/inputext.h

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

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

mercurial