summaryrefslogtreecommitdiff
path: root/Build/source/libs/icu/icu-50.1/i18n/csmatch.h
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2012-10-26 07:13:09 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2012-10-26 07:13:09 +0000
commit74cc05c672add53f566ac385f117008e8c4b3eda (patch)
treece973a7d2e4814a20d52a55b1a2131d1515e9911 /Build/source/libs/icu/icu-50.1/i18n/csmatch.h
parent6439fb8917718c4d620170e1459a1d9e7ab3c441 (diff)
icu 50.1 (50_rc)
git-svn-id: svn://tug.org/texlive/trunk@28087 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs/icu/icu-50.1/i18n/csmatch.h')
-rw-r--r--Build/source/libs/icu/icu-50.1/i18n/csmatch.h69
1 files changed, 69 insertions, 0 deletions
diff --git a/Build/source/libs/icu/icu-50.1/i18n/csmatch.h b/Build/source/libs/icu/icu-50.1/i18n/csmatch.h
new file mode 100644
index 00000000000..6a3671c44f7
--- /dev/null
+++ b/Build/source/libs/icu/icu-50.1/i18n/csmatch.h
@@ -0,0 +1,69 @@
+/*
+ **********************************************************************
+ * Copyright (C) 2005-2012, International Business Machines
+ * Corporation and others. All Rights Reserved.
+ **********************************************************************
+ */
+
+#ifndef __CSMATCH_H
+#define __CSMATCH_H
+
+#include "unicode/uobject.h"
+
+#if !UCONFIG_NO_CONVERSION
+
+U_NAMESPACE_BEGIN
+
+class InputText;
+class CharsetRecognizer;
+
+/*
+ * CharsetMatch represents the results produced by one Charset Recognizer for one input text
+ * Any confidence > 0 indicates a possible match, meaning that the input bytes
+ * are at least legal.
+ *
+ * The full results of a detect are represented by an array of these
+ * CharsetMatch objects, each representing a possible matching charset.
+ *
+ * Note that a single charset recognizer may detect multiple closely related
+ * charsets, and set different names depending on the exact input bytes seen.
+ */
+class CharsetMatch : public UMemory
+{
+ private:
+ InputText *textIn;
+ int32_t confidence;
+ const char *fCharsetName;
+ const char *fLang;
+
+ public:
+ CharsetMatch();
+
+ /**
+ * fully set the state of this CharsetMatch.
+ * Called by the CharsetRecognizers to record match results.
+ * Default (NULL) parameters for names will be filled by calling the
+ * corresponding getters on the recognizer.
+ */
+ void set(InputText *input,
+ const CharsetRecognizer *cr,
+ int32_t conf,
+ const char *csName=NULL,
+ const char *lang=NULL);
+
+ /**
+ * Return the name of the charset for this Match
+ */
+ const char *getName() const;
+
+ const char *getLanguage()const;
+
+ int32_t getConfidence()const;
+
+ int32_t getUChars(UChar *buf, int32_t cap, UErrorCode *status) const;
+};
+
+U_NAMESPACE_END
+
+#endif
+#endif /* __CSMATCH_H */