/src/icu/icu4c/source/i18n/sharedpluralrules.h
Line | Count | Source (jump to first uncovered line) |
1 | | // © 2016 and later: Unicode, Inc. and others. |
2 | | // License & terms of use: http://www.unicode.org/copyright.html |
3 | | /* |
4 | | ****************************************************************************** |
5 | | * Copyright (C) 2014, International Business Machines |
6 | | * Corporation and others. All Rights Reserved. |
7 | | ****************************************************************************** |
8 | | * sharedpluralrules.h |
9 | | */ |
10 | | |
11 | | #ifndef __SHARED_PLURALRULES_H__ |
12 | | #define __SHARED_PLURALRULES_H__ |
13 | | |
14 | | #include "unicode/utypes.h" |
15 | | #include "sharedobject.h" |
16 | | #include "unifiedcache.h" |
17 | | |
18 | | U_NAMESPACE_BEGIN |
19 | | |
20 | | class PluralRules; |
21 | | |
22 | | class U_I18N_API SharedPluralRules : public SharedObject { |
23 | | public: |
24 | 4.64k | SharedPluralRules(PluralRules *prToAdopt) : ptr(prToAdopt) { } |
25 | | virtual ~SharedPluralRules(); |
26 | 15.0k | const PluralRules *operator->() const { return ptr; } |
27 | 0 | const PluralRules &operator*() const { return *ptr; } |
28 | | private: |
29 | | PluralRules *ptr; |
30 | | SharedPluralRules(const SharedPluralRules &) = delete; |
31 | | SharedPluralRules &operator=(const SharedPluralRules &) =delete; |
32 | | }; |
33 | | |
34 | | template<> U_I18N_API |
35 | | const SharedPluralRules *LocaleCacheKey<SharedPluralRules>::createObject( |
36 | | const void * /*unused*/, UErrorCode &status) const; |
37 | | |
38 | | U_NAMESPACE_END |
39 | | |
40 | | #endif |