| 1 |
. |
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
#ifndef __SHARED_NUMBERFORMAT_H__ |
| 12 |
#define __SHARED_NUMBERFORMAT_H__ |
| 13 |
|
| 14 |
#include "unicode/utypes.h" |
| 15 |
#include "sharedobject.h" |
| 16 |
#include "unifiedcache.h" |
| 17 |
|
| 18 |
U_NAMESPACE_BEGIN |
| 19 |
|
| 20 |
class NumberFormat; |
| 21 |
|
| 22 |
class U_I18N_API SharedNumberFormat : public SharedObject { |
| 23 |
public: |
| 24 |
SharedNumberFormat(NumberFormat *nfToAdopt) : ptr(nfToAdopt) { } |
| 25 |
virtual ~SharedNumberFormat(); |
| 26 |
const NumberFormat *get() const { return ptr; } |
| 27 |
const NumberFormat *operator->() const { return ptr; } |
| 28 |
const NumberFormat &operator*() const { return *ptr; } |
| 29 |
private: |
| 30 |
NumberFormat *ptr; |
| 31 |
SharedNumberFormat(const SharedNumberFormat &) = delete; |
| 32 |
SharedNumberFormat &operator=(const SharedNumberFormat &) = delete; |
| 33 |
}; |
| 34 |
|
| 35 |
template<> U_I18N_API |
| 36 |
const SharedNumberFormat *LocaleCacheKey<SharedNumberFormat>::createObject( |
| 37 |
const void * , UErrorCode &status) const; |
| 38 |
|
| 39 |
U_NAMESPACE_END |
| 40 |
|
| 41 |
#endif |