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

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

mercurial