ICU 4.2.1
|
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. More... | |
TimeUnit (const TimeUnit &other) | |
Copy operator. More... | |
TimeUnit & | operator= (const TimeUnit &other) |
Assignment operator. More... | |
virtual UBool | operator== (const UObject &other) const |
Equality operator. More... | |
UBool | operator!= (const UObject &other) const |
Non-Equality operator. More... | |
virtual UClassID | getDynamicClassID () const |
Returns a unique class ID for this object POLYMORPHICALLY. More... | |
UTimeUnitFields | getTimeUnitField () const |
Get time unit field. More... | |
virtual | ~TimeUnit () |
Destructor. More... | |
![]() | |
virtual | ~MeasureUnit () |
Destructor. More... | |
![]() | |
virtual | ~UObject () |
Destructor. More... | |
Static Public Member Functions | |
static TimeUnit * | createInstance (UTimeUnitFields timeUnitField, UErrorCode &status) |
Create Instance. More... | |
static UClassID | getStaticClassID () |
Returns the class ID for this class. More... | |
![]() | |
static void * | operator new (size_t size) |
Override for ICU4C C++ memory management. More... | |
static void * | operator new[] (size_t size) |
Override for ICU4C C++ memory management. More... | |
static void | operator delete (void *p) |
Override for ICU4C C++ memory management. More... | |
static void | operator delete[] (void *p) |
Override for ICU4C C++ memory management. More... | |
static void * | operator new (size_t, void *ptr) |
Override for ICU4C C++ memory management for STL. More... | |
static void | operator delete (void *, void *) |
Override for ICU4C C++ memory management for STL. More... | |
Additional Inherited Members | |
![]() | |
MeasureUnit () | |
Default constructor. More... | |
Measurement unit for time units.
TimeUnit::TimeUnit | ( | const TimeUnit & | other | ) |
Copy operator.
|
virtual |
Destructor.
|
virtual |
Override clone.
Implements MeasureUnit.
|
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. |
|
virtual |
Returns a unique class ID for this object POLYMORPHICALLY.
This method implements a simple form of RTTI used by ICU.
Implements UObject.
|
static |
Returns the class ID for this class.
This is used to compare to the return value of getDynamicClassID().
UTimeUnitFields TimeUnit::getTimeUnitField | ( | ) | const |
Get time unit field.
Non-Equality operator.
Definition at line 138 of file tmunit.h.
References operator==().
Assignment operator.
Equality operator.
Implements MeasureUnit.
Referenced by operator!=().