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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « icu46/source/i18n/format.cpp ('k') | icu46/source/i18n/fphdlimp.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 /*
2 *******************************************************************************
3 * Copyright (C) 2009-2010, International Business Machines Corporation and *
4 * others. All Rights Reserved. *
5 *******************************************************************************
6 */
7
8 #ifndef FPHDLIMP_H
9 #define FPHDLIMP_H
10
11 #if !UCONFIG_NO_FORMATTING
12
13 #include "unicode/utypes.h"
14 #include "unicode/fieldpos.h"
15 #include "unicode/fpositer.h"
16
17 U_NAMESPACE_BEGIN
18
19 // utility FieldPositionHandler
20 // base class, null implementation
21
22 class FieldPositionHandler: public UMemory {
23 public:
24 virtual ~FieldPositionHandler();
25 virtual void addAttribute(int32_t id, int32_t start, int32_t limit);
26 virtual void shiftLast(int32_t delta);
27 virtual UBool isRecording(void);
28 };
29
30
31 // utility subclass FieldPositionOnlyHandler
32
33 class FieldPositionOnlyHandler : public FieldPositionHandler {
34 FieldPosition& pos;
35
36 public:
37 FieldPositionOnlyHandler(FieldPosition& pos);
38 virtual ~FieldPositionOnlyHandler();
39
40 virtual void addAttribute(int32_t id, int32_t start, int32_t limit);
41 virtual void shiftLast(int32_t delta);
42 virtual UBool isRecording(void);
43 };
44
45
46 // utility subclass FieldPositionIteratorHandler
47
48 class FieldPositionIteratorHandler : public FieldPositionHandler {
49 FieldPositionIterator* iter; // can be NULL
50 UVector32* vec;
51 UErrorCode status;
52
53 // Note, we keep a reference to status, so if status is on the stack, we have
54 // to be destroyed before status goes out of scope. Easiest thing is to
55 // allocate us on the stack in the same (or narrower) scope as status has.
56 // This attempts to encourage that by blocking heap allocation.
57 void *operator new(size_t s);
58 void *operator new[](size_t s);
59
60 public:
61 FieldPositionIteratorHandler(FieldPositionIterator* posIter, UErrorCode& statu s);
62 ~FieldPositionIteratorHandler();
63
64 virtual void addAttribute(int32_t id, int32_t start, int32_t limit);
65 virtual void shiftLast(int32_t delta);
66 virtual UBool isRecording(void);
67 };
68
69 U_NAMESPACE_END
70
71 #endif /* !UCONFIG_NO_FORMATTING */
72
73 #endif /* FPHDLIMP_H */
OLDNEW
« 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