michael@0: /* michael@0: ********************************************************************** michael@0: * Copyright (c) 2004-2006, International Business Machines michael@0: * Corporation and others. All Rights Reserved. michael@0: ********************************************************************** michael@0: * Author: Alan Liu michael@0: * Created: April 26, 2004 michael@0: * Since: ICU 3.0 michael@0: ********************************************************************** michael@0: */ michael@0: #ifndef __MEASUREUNIT_H__ michael@0: #define __MEASUREUNIT_H__ michael@0: michael@0: #include "unicode/utypes.h" michael@0: michael@0: #if !UCONFIG_NO_FORMATTING michael@0: michael@0: #include "unicode/fmtable.h" michael@0: michael@0: /** michael@0: * \file michael@0: * \brief C++ API: A unit for measuring a quantity. michael@0: */ michael@0: michael@0: U_NAMESPACE_BEGIN michael@0: michael@0: /** michael@0: * A unit such as length, mass, volume, currency, etc. A unit is michael@0: * coupled with a numeric amount to produce a Measure. michael@0: * michael@0: *

This is an abstract class. michael@0: * michael@0: * @author Alan Liu michael@0: * @stable ICU 3.0 michael@0: */ michael@0: class U_I18N_API MeasureUnit: public UObject { michael@0: public: michael@0: /** michael@0: * Return a polymorphic clone of this object. The result will michael@0: * have the same class as returned by getDynamicClassID(). michael@0: * @stable ICU 3.0 michael@0: */ michael@0: virtual UObject* clone() const = 0; michael@0: michael@0: /** michael@0: * Destructor michael@0: * @stable ICU 3.0 michael@0: */ michael@0: virtual ~MeasureUnit(); michael@0: michael@0: /** michael@0: * Equality operator. Return true if this object is equal michael@0: * to the given object. michael@0: * @stable ICU 3.0 michael@0: */ michael@0: virtual UBool operator==(const UObject& other) const = 0; michael@0: michael@0: protected: michael@0: /** michael@0: * Default constructor. michael@0: * @stable ICU 3.0 michael@0: */ michael@0: MeasureUnit(); michael@0: }; michael@0: michael@0: U_NAMESPACE_END michael@0: michael@0: // NOTE: There is no measunit.cpp. For implementation, see measure.cpp. [alan] michael@0: michael@0: #endif // !UCONFIG_NO_FORMATTING michael@0: #endif // __MEASUREUNIT_H__