]> git.saurik.com Git - apple/icu.git/blame - icuSources/i18n/sharednumberformat.h
ICU-531.30.tar.gz
[apple/icu.git] / icuSources / i18n / sharednumberformat.h
CommitLineData
57a6839d
A
1/*
2******************************************************************************
3* Copyright (C) 2014, International Business Machines
4* Corporation and others. All Rights Reserved.
5******************************************************************************
6* sharednumberformat.h
7*/
8
9#ifndef __SHARED_NUMBERFORMAT_H__
10#define __SHARED_NUMBERFORMAT_H__
11
12#include "unicode/utypes.h"
13#include "sharedobject.h"
14#include "sharedptr.h"
15
16U_NAMESPACE_BEGIN
17
18class NumberFormat;
19
20class U_I18N_API SharedNumberFormat : public SharedObject {
21public:
22 SharedNumberFormat(NumberFormat *nfToAdopt) : ptr(nfToAdopt) { }
23 virtual ~SharedNumberFormat();
24 const NumberFormat *get() const { return ptr; }
25 const NumberFormat *operator->() const { return ptr; }
26 const NumberFormat &operator*() const { return *ptr; }
27private:
28 NumberFormat *ptr;
29 SharedNumberFormat(const SharedNumberFormat &);
30 SharedNumberFormat &operator=(const SharedNumberFormat &);
31};
32
33U_NAMESPACE_END
34
35#endif