ICU 57.1 57.1
tmunit.h
Go to the documentation of this file.
1/*
2 *******************************************************************************
3 * Copyright (C) 2009-2016, International Business Machines Corporation, *
4 * Google, and others. All Rights Reserved. *
5 *******************************************************************************
6 */
7
8#ifndef __TMUNIT_H__
9#define __TMUNIT_H__
10
11
18#include "unicode/measunit.h"
19
20#if !UCONFIG_NO_FORMATTING
21
23
31public:
37 UTIMEUNIT_YEAR,
38 UTIMEUNIT_MONTH,
39 UTIMEUNIT_DAY,
40 UTIMEUNIT_WEEK,
41 UTIMEUNIT_HOUR,
42 UTIMEUNIT_MINUTE,
43 UTIMEUNIT_SECOND,
44 UTIMEUNIT_FIELD_COUNT
45 };
46
59
60
65 virtual UObject* clone() const;
66
72
78
87 virtual UClassID getDynamicClassID() const;
88
96
97
104
109 virtual ~TimeUnit();
110
111private:
112 UTimeUnitFields fTimeUnitField;
113
119
120};
121
122
124
125#endif /* #if !UCONFIG_NO_FORMATTING */
126
127#endif // __TMUNIT_H__
128//eof
129//
"Smart pointer" base class; do not use directly: use LocalPointer etc.
A unit such as length, mass, volume, currency, etc.
Definition measunit.h:36
Measurement unit for time units.
Definition tmunit.h:30
static UClassID getStaticClassID()
Returns the class ID for this class.
static TimeUnit * createInstance(UTimeUnitFields timeUnitField, UErrorCode &status)
Create Instance.
virtual UClassID getDynamicClassID() const
Returns a unique class ID for this object POLYMORPHICALLY.
virtual ~TimeUnit()
Destructor.
TimeUnit(const TimeUnit &other)
Copy operator.
virtual UObject * clone() const
Override clone.
UTimeUnitFields getTimeUnitField() const
Get time unit field.
UTimeUnitFields
Constants for all the time units we supported.
Definition tmunit.h:36
TimeUnit & operator=(const TimeUnit &other)
Assignment operator.
UObject is the common ICU "boilerplate" class.
Definition uobject.h:221
C++ API: A unit for measuring a quantity.
UErrorCode
Error code to replace exception handling, so that the code is compatible with all C++ compilers,...
Definition utypes.h:476
#define U_I18N_API
Set to export library symbols from inside the i18n library, and to import them from outside.
Definition utypes.h:358
#define U_NAMESPACE_END
This is used to end a declaration of a public ICU C++ API.
Definition uversion.h:130
#define U_NAMESPACE_BEGIN
This is used to begin a declaration of a public ICU C++ API.
Definition uversion.h:129