1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/intl/icu/source/i18n/inputext.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,61 @@ 1.4 +/* 1.5 + ********************************************************************** 1.6 + * Copyright (C) 2005-2008, International Business Machines 1.7 + * Corporation and others. All Rights Reserved. 1.8 + ********************************************************************** 1.9 + */ 1.10 + 1.11 +#ifndef __INPUTEXT_H 1.12 +#define __INPUTEXT_H 1.13 + 1.14 +/** 1.15 + * \file 1.16 + * \internal 1.17 + * 1.18 + * This is an internal header for the Character Set Detection code. The 1.19 + * name is probably too generic... 1.20 + */ 1.21 + 1.22 + 1.23 +#include "unicode/uobject.h" 1.24 + 1.25 +#if !UCONFIG_NO_CONVERSION 1.26 + 1.27 +U_NAMESPACE_BEGIN 1.28 + 1.29 +class InputText : public UMemory 1.30 +{ 1.31 + // Prevent copying 1.32 + InputText(const InputText &); 1.33 +public: 1.34 + InputText(UErrorCode &status); 1.35 + ~InputText(); 1.36 + 1.37 + void setText(const char *in, int32_t len); 1.38 + void setDeclaredEncoding(const char *encoding, int32_t len); 1.39 + UBool isSet() const; 1.40 + void MungeInput(UBool fStripTags); 1.41 + 1.42 + // The text to be checked. Markup will have been 1.43 + // removed if appropriate. 1.44 + uint8_t *fInputBytes; 1.45 + int32_t fInputLen; // Length of the byte data in fInputBytes. 1.46 + // byte frequency statistics for the input text. 1.47 + // Value is percent, not absolute. 1.48 + // Value is rounded up, so zero really means zero occurences. 1.49 + int16_t *fByteStats; 1.50 + UBool fC1Bytes; // True if any bytes in the range 0x80 - 0x9F are in the input;false by default 1.51 + char *fDeclaredEncoding; 1.52 + 1.53 + const uint8_t *fRawInput; // Original, untouched input bytes. 1.54 + // If user gave us a byte array, this is it. 1.55 + // If user gave us a stream, it's read to a 1.56 + // buffer here. 1.57 + int32_t fRawLength; // Length of data in fRawInput array. 1.58 + 1.59 +}; 1.60 + 1.61 +U_NAMESPACE_END 1.62 + 1.63 +#endif 1.64 +#endif /* __INPUTEXT_H */