Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Unified Diff: icu46/source/i18n/fphdlimp.h

Issue 5516007: Check in the pristine copy of ICU 4.6... (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party/
Patch Set: Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « icu46/source/i18n/format.cpp ('k') | icu46/source/i18n/fphdlimp.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: icu46/source/i18n/fphdlimp.h
===================================================================
--- icu46/source/i18n/fphdlimp.h (revision 0)
+++ icu46/source/i18n/fphdlimp.h (revision 0)
@@ -0,0 +1,73 @@
+/*
+*******************************************************************************
+* Copyright (C) 2009-2010, 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 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);
+};
+
+
+// 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);
+};
+
+
+// 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);
+};
+
+U_NAMESPACE_END
+
+#endif /* !UCONFIG_NO_FORMATTING */
+
+#endif /* FPHDLIMP_H */
Property changes on: icu46/source/i18n/fphdlimp.h
___________________________________________________________________
Added: svn:eol-style
+ LF
« no previous file with comments | « icu46/source/i18n/format.cpp ('k') | icu46/source/i18n/fphdlimp.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698