1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/intl/icu/source/i18n/unicode/measunit.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,71 @@ 1.4 +/* 1.5 +********************************************************************** 1.6 +* Copyright (c) 2004-2006, International Business Machines 1.7 +* Corporation and others. All Rights Reserved. 1.8 +********************************************************************** 1.9 +* Author: Alan Liu 1.10 +* Created: April 26, 2004 1.11 +* Since: ICU 3.0 1.12 +********************************************************************** 1.13 +*/ 1.14 +#ifndef __MEASUREUNIT_H__ 1.15 +#define __MEASUREUNIT_H__ 1.16 + 1.17 +#include "unicode/utypes.h" 1.18 + 1.19 +#if !UCONFIG_NO_FORMATTING 1.20 + 1.21 +#include "unicode/fmtable.h" 1.22 + 1.23 +/** 1.24 + * \file 1.25 + * \brief C++ API: A unit for measuring a quantity. 1.26 + */ 1.27 + 1.28 +U_NAMESPACE_BEGIN 1.29 + 1.30 +/** 1.31 + * A unit such as length, mass, volume, currency, etc. A unit is 1.32 + * coupled with a numeric amount to produce a Measure. 1.33 + * 1.34 + * <p>This is an abstract class. 1.35 + * 1.36 + * @author Alan Liu 1.37 + * @stable ICU 3.0 1.38 + */ 1.39 +class U_I18N_API MeasureUnit: public UObject { 1.40 + public: 1.41 + /** 1.42 + * Return a polymorphic clone of this object. The result will 1.43 + * have the same class as returned by getDynamicClassID(). 1.44 + * @stable ICU 3.0 1.45 + */ 1.46 + virtual UObject* clone() const = 0; 1.47 + 1.48 + /** 1.49 + * Destructor 1.50 + * @stable ICU 3.0 1.51 + */ 1.52 + virtual ~MeasureUnit(); 1.53 + 1.54 + /** 1.55 + * Equality operator. Return true if this object is equal 1.56 + * to the given object. 1.57 + * @stable ICU 3.0 1.58 + */ 1.59 + virtual UBool operator==(const UObject& other) const = 0; 1.60 + 1.61 + protected: 1.62 + /** 1.63 + * Default constructor. 1.64 + * @stable ICU 3.0 1.65 + */ 1.66 + MeasureUnit(); 1.67 +}; 1.68 + 1.69 +U_NAMESPACE_END 1.70 + 1.71 +// NOTE: There is no measunit.cpp. For implementation, see measure.cpp. [alan] 1.72 + 1.73 +#endif // !UCONFIG_NO_FORMATTING 1.74 +#endif // __MEASUREUNIT_H__