ICU 4.8.1.1  4.8.1.1
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
tmunit.h
Go to the documentation of this file.
1 /*
2  *******************************************************************************
3  * Copyright (C) 2009-2010, Google, International Business Machines Corporation and *
4  * 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 
31 public:
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 
57  static TimeUnit* U_EXPORT2 createInstance(UTimeUnitFields timeUnitField,
58  UErrorCode& status);
59 
60 
65  virtual UObject* clone() const;
66 
71  TimeUnit(const TimeUnit& other);
72 
77  TimeUnit& operator=(const TimeUnit& other);
78 
84  virtual UBool operator==(const UObject& other) const;
85 
91  UBool operator!=(const UObject& other) const;
92 
101  virtual UClassID getDynamicClassID() const;
102 
109  static UClassID U_EXPORT2 getStaticClassID();
110 
111 
117  UTimeUnitFields getTimeUnitField() const;
118 
123  virtual ~TimeUnit();
124 
125 private:
126  UTimeUnitFields fTimeUnitField;
127 
132  TimeUnit(UTimeUnitFields timeUnitField);
133 
134 };
135 
136 
137 inline UBool
138 TimeUnit::operator!=(const UObject& other) const {
139  return !operator==(other);
140 }
141 
142 
144 
145 #endif /* #if !UCONFIG_NO_FORMATTING */
146 
147 #endif // __TMUNIT_H__
148 //eof
149 //