2017-01-20 00:20:31 +00:00
|
|
|
// © 2016 and later: Unicode, Inc. and others.
|
2016-06-15 18:58:17 +00:00
|
|
|
// License & terms of use: http://www.unicode.org/copyright.html
|
2014-02-10 19:13:50 +00:00
|
|
|
/*
|
|
|
|
******************************************************************************
|
2016-05-31 21:45:07 +00:00
|
|
|
* Copyright (C) 2014, International Business Machines
|
|
|
|
* Corporation and others. All Rights Reserved.
|
2014-02-10 19:13:50 +00:00
|
|
|
******************************************************************************
|
|
|
|
* sharednumberformat.h
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __SHARED_NUMBERFORMAT_H__
|
|
|
|
#define __SHARED_NUMBERFORMAT_H__
|
|
|
|
|
|
|
|
#include "unicode/utypes.h"
|
|
|
|
#include "sharedobject.h"
|
|
|
|
|
|
|
|
U_NAMESPACE_BEGIN
|
|
|
|
|
|
|
|
class NumberFormat;
|
|
|
|
|
|
|
|
class U_I18N_API SharedNumberFormat : public SharedObject {
|
|
|
|
public:
|
2014-03-17 18:07:34 +00:00
|
|
|
SharedNumberFormat(NumberFormat *nfToAdopt) : ptr(nfToAdopt) { }
|
|
|
|
virtual ~SharedNumberFormat();
|
|
|
|
const NumberFormat *get() const { return ptr; }
|
|
|
|
const NumberFormat *operator->() const { return ptr; }
|
|
|
|
const NumberFormat &operator*() const { return *ptr; }
|
2014-02-10 19:13:50 +00:00
|
|
|
private:
|
2014-03-17 18:07:34 +00:00
|
|
|
NumberFormat *ptr;
|
|
|
|
SharedNumberFormat(const SharedNumberFormat &);
|
|
|
|
SharedNumberFormat &operator=(const SharedNumberFormat &);
|
2014-02-10 19:13:50 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
U_NAMESPACE_END
|
|
|
|
|
|
|
|
#endif
|