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

Side by Side Diff: source/i18n/sharedbreakiterator.h

Issue 845603002: Update ICU to 54.1 step 1 (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/icu.git@master
Patch Set: remove unusued directories Created 5 years, 11 months 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
« no previous file with comments | « source/i18n/scriptset.cpp ('k') | source/i18n/sharedbreakiterator.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /*
2 ******************************************************************************
3 * Copyright (C) 2014, International Business Machines
4 * Corporation and others. All Rights Reserved.
5 ******************************************************************************
6 * sharedbreakiterator.h
7 */
8
9 #ifndef __SHARED_BREAKITERATOR_H__
10 #define __SHARED_BREAKITERATOR_H__
11
12 #include "unicode/utypes.h"
13 #include "sharedobject.h"
14
15 #if !UCONFIG_NO_BREAK_ITERATION
16
17 U_NAMESPACE_BEGIN
18
19 class BreakIterator;
20
21 // SharedBreakIterator encapsulates a shared BreakIterator. Because
22 // BreakIterator has mutable semantics, clients must ensure that all uses
23 // of a particular shared BreakIterator is protected by the same mutex
24 // ensuring that only one thread at a time gets access to that shared
25 // BreakIterator. Clients can accomplish this by creating a mutex for all
26 // uses of break iterator within a particular class. Then objects of that
27 // class may then freely share break iterators among themselves. However,
28 // these shared break iterators must never be exposed outside of that class.
29 class U_I18N_API SharedBreakIterator : public SharedObject {
30 public:
31 SharedBreakIterator(BreakIterator *biToAdopt);
32 virtual ~SharedBreakIterator();
33
34 BreakIterator *get() const { return ptr; }
35 BreakIterator *operator->() const { return ptr; }
36 BreakIterator &operator*() const { return *ptr; }
37 private:
38 BreakIterator *ptr;
39 SharedBreakIterator(const SharedBreakIterator &);
40 SharedBreakIterator &operator=(const SharedBreakIterator &);
41 };
42
43 U_NAMESPACE_END
44
45 #endif
46
47 #endif
OLDNEW
« no previous file with comments | « source/i18n/scriptset.cpp ('k') | source/i18n/sharedbreakiterator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698