|
ICU 50.2 50.2
|
Measurement unit for time units. More...
#include <tmunit.h>
Public Types | |
| enum | UTimeUnitFields { UTIMEUNIT_YEAR , UTIMEUNIT_MONTH , UTIMEUNIT_DAY , UTIMEUNIT_WEEK , UTIMEUNIT_HOUR , UTIMEUNIT_MINUTE , UTIMEUNIT_SECOND , UTIMEUNIT_FIELD_COUNT } |
| Constants for all the time units we supported. More... | |
Public Member Functions | |
| virtual UObject * | clone () const |
| Override clone. | |
| TimeUnit (const TimeUnit &other) | |
| Copy operator. | |
| TimeUnit & | operator= (const TimeUnit &other) |
| Assignment operator. | |
| virtual UBool | operator== (const UObject &other) const |
| Equality operator. | |
| UBool | operator!= (const UObject &other) const |
| Non-Equality operator. | |
| virtual UClassID | getDynamicClassID () const |
| Returns a unique class ID for this object POLYMORPHICALLY. | |
| UTimeUnitFields | getTimeUnitField () const |
| Get time unit field. | |
| virtual | ~TimeUnit () |
| Destructor. | |
Public Member Functions inherited from MeasureUnit | |
| virtual | ~MeasureUnit () |
| Destructor. | |
Public Member Functions inherited from UObject | |
| virtual | ~UObject () |
| Destructor. | |
Static Public Member Functions | |
| static TimeUnit * | createInstance (UTimeUnitFields timeUnitField, UErrorCode &status) |
| Create Instance. | |
| static UClassID | getStaticClassID () |
| Returns the class ID for this class. | |
Additional Inherited Members | |
Protected Member Functions inherited from MeasureUnit | |
| MeasureUnit () | |
| Default constructor. | |
| TimeUnit::TimeUnit | ( | const TimeUnit & | other | ) |
Copy operator.
References TimeUnit().
Referenced by createInstance(), operator=(), TimeUnit(), and ~TimeUnit().
|
virtual |
|
virtual |
|
static |
Create Instance.
| timeUnitField | time unit field based on which the instance is created. |
| status | input-output error code. If the timeUnitField is invalid, then this will be set to U_ILLEGAL_ARGUMENT_ERROR. |
References TimeUnit().
|
virtual |
|
static |
Returns the class ID for this class.
This is used to compare to the return value of getDynamicClassID().
| UTimeUnitFields TimeUnit::getTimeUnitField | ( | ) | const |
Non-Equality operator.
Definition at line 138 of file tmunit.h.
References operator==().
Equality operator.
Implements MeasureUnit.
Referenced by operator!=().