summaryrefslogtreecommitdiffstats
path: root/intl/icu/source/i18n/fphdlimp.h
diff options
context:
space:
mode:
authorMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
committerMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
commit5f8de423f190bbb79a62f804151bc24824fa32d8 (patch)
tree10027f336435511475e392454359edea8e25895d /intl/icu/source/i18n/fphdlimp.h
parent49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff)
downloadUXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip
Add m-esr52 at 52.6.0
Diffstat (limited to 'intl/icu/source/i18n/fphdlimp.h')
-rw-r--r--intl/icu/source/i18n/fphdlimp.h75
1 files changed, 75 insertions, 0 deletions
diff --git a/intl/icu/source/i18n/fphdlimp.h b/intl/icu/source/i18n/fphdlimp.h
new file mode 100644
index 000000000..b1fe42bb4
--- /dev/null
+++ b/intl/icu/source/i18n/fphdlimp.h
@@ -0,0 +1,75 @@
+// Copyright (C) 2016 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html
+/*
+*******************************************************************************
+* Copyright (C) 2009-2015, International Business Machines Corporation and *
+* others. All Rights Reserved. *
+*******************************************************************************
+*/
+
+#ifndef FPHDLIMP_H
+#define FPHDLIMP_H
+
+#if !UCONFIG_NO_FORMATTING
+
+#include "unicode/utypes.h"
+#include "unicode/fieldpos.h"
+#include "unicode/fpositer.h"
+
+U_NAMESPACE_BEGIN
+
+// utility FieldPositionHandler
+// base class, null implementation
+
+class U_I18N_API FieldPositionHandler: public UMemory {
+ public:
+ virtual ~FieldPositionHandler();
+ virtual void addAttribute(int32_t id, int32_t start, int32_t limit);
+ virtual void shiftLast(int32_t delta);
+ virtual UBool isRecording(void) const;
+};
+
+
+// utility subclass FieldPositionOnlyHandler
+
+class FieldPositionOnlyHandler : public FieldPositionHandler {
+ FieldPosition& pos;
+
+ public:
+ FieldPositionOnlyHandler(FieldPosition& pos);
+ virtual ~FieldPositionOnlyHandler();
+
+ virtual void addAttribute(int32_t id, int32_t start, int32_t limit);
+ virtual void shiftLast(int32_t delta);
+ virtual UBool isRecording(void) const;
+};
+
+
+// utility subclass FieldPositionIteratorHandler
+
+class FieldPositionIteratorHandler : public FieldPositionHandler {
+ FieldPositionIterator* iter; // can be NULL
+ UVector32* vec;
+ UErrorCode status;
+
+ // Note, we keep a reference to status, so if status is on the stack, we have
+ // to be destroyed before status goes out of scope. Easiest thing is to
+ // allocate us on the stack in the same (or narrower) scope as status has.
+ // This attempts to encourage that by blocking heap allocation.
+ void *operator new(size_t s);
+ void *operator new[](size_t s);
+
+ public:
+ FieldPositionIteratorHandler(FieldPositionIterator* posIter, UErrorCode& status);
+ ~FieldPositionIteratorHandler();
+
+ virtual void addAttribute(int32_t id, int32_t start, int32_t limit);
+ virtual void shiftLast(int32_t delta);
+ virtual UBool isRecording(void) const;
+};
+
+U_NAMESPACE_END
+
+#endif /* !UCONFIG_NO_FORMATTING */
+
+#endif /* FPHDLIMP_H */