TimeZone.h

Go to the documentation of this file.
00001 #ifndef JAVA_UTIL_TIMEZONE_H
00002 #define JAVA_UTIL_TIMEZONE_H 1
00003 
00004 #ifndef JAVA_UTIL_DATE_H
00005 #include <java_util/Date.h>
00006 #endif /* JAVA_UTIL_DATE_H */
00007 
00008 namespace java {
00009   namespace util {
00010 
00063     class JAVA_UTIL_SPEC TimeZone : public Object {
00064 
00065     public:
00066 
00067       enum FORMAT {
00074         SHORT,
00075 
00082         LONG
00083       };
00084 
00085       enum MILLIS {
00086         millisPerMinute = 60*1000,
00087         millisPerHour = 60*millisPerMinute,
00088         millisPerDay = 24*millisPerHour,
00089         millisPerWeek = 7*millisPerDay
00090       };
00091 
00106       virtual jint getOffset(jint era, jint year, jint month, jint day,
00107                              jint dayOfWeek, jint milliseconds, jint monthLength, jint prevMonthLength) const = 0;
00108 
00114       virtual void setRawOffset(jint offsetMillis) = 0;
00115 
00121       virtual jint getRawOffset() const = 0;
00122 
00127       virtual String getID() const;
00128 
00134       virtual void setID(const String& ID);
00135 
00141       virtual jboolean useDaylightTime() const = 0;
00142 
00154       static TimeZone& getTimeZone(const String& ID);
00155 
00163       static Array<String> getAvailableIDs(jint rawOffset);
00164 
00169       static Array<String> getAvailableIDs();
00170 
00177       static TimeZone& getDefault();
00178 
00186       static void setDefault(const Ref<TimeZone>& zone);
00187 
00197       jboolean hasSameRules(const TimeZone& other) const;
00198 
00199     protected:
00200 
00201       TimeZone();
00202 
00203     private:
00204 
00205       String ID;
00206       REGISTER_MEMBERS;
00207 
00208     };
00209 
00210   } // namespace util
00211 } // namespace java
00212 
00213 #endif /* TIMEZONE_H */

Generated on Fri May 16 11:54:44 2008 for CrossPlatformJavaLikeC++API by  doxygen 1.5.3