00001 #ifndef _IT_BUS_GMONTH_H_
00002 #define _IT_BUS_GMONTH_H_
00003
00004
00005
00006
00007 #include <it_bus/types.h>
00008 #include <it_bus/exception.h>
00009 #include <it_bus/api_defines.h>
00010 #include <it_bus/any_simple_type.h>
00011
00012 namespace IT_Reflect
00013 {
00014 class Reflection;
00015 template <class T> class ValueRef;
00016 }
00017
00018 namespace IT_Bus
00019 {
00020 class Duration;
00021 class GMonthImpl;
00022
00027 class IT_AFC_API GMonth : public AnySimpleType
00028 {
00029 public:
00030 typedef IT_Reflect::ValueRef<IT_Bus::GMonth> IT_ReflectionType;
00031
00039 GMonth(
00040 short wMonth = 1
00041 ) throw((Exception));
00042
00050 GMonth(
00051 const char* value
00052 ) throw((Exception));
00053
00061 GMonth(
00062 const String& value
00063 ) throw((Exception));
00064
00068 GMonth(
00069 const GMonth& copy
00070 );
00071
00075 virtual ~GMonth();
00076
00077 virtual AnyType&
00078 copy(
00079 const AnyType& rhs
00080 );
00081
00082 virtual void
00083 write_value(
00084 AnySimpleTypeWriter& writer
00085 ) const throw((IT_Bus::SerializationException));
00086
00087 virtual void
00088 read_value(
00089 AnySimpleTypeReader& reader
00090 ) throw((IT_Bus::DeserializationException));
00091
00097 virtual AnyType::Kind
00098 get_kind() const;
00099
00105 virtual const QName&
00106 get_type() const;
00107
00108 virtual IT_Reflect::Reflection*
00109 get_reflection()
00110 throw((IT_Reflect::ReflectException));
00111
00112 virtual const IT_Reflect::Reflection*
00113 get_reflection() const
00114 throw((IT_Reflect::ReflectException));
00115
00121 String
00122 to_string() const;
00123
00129 void
00130 from_string(
00131 const String& str
00132 ) throw((Exception));
00133
00139 short
00140 getMonth() const;
00141
00148 void
00149 setMonth(
00150 short wMonth
00151 ) throw((Exception));
00152
00158 bool
00159 haveUTCTimeZoneOffset() const;
00160
00164 void
00165 setLocalTimeZone();
00166
00172 void
00173 getUTCTimeZoneOffset(
00174 short& hour_offset,
00175 short& minute_offset
00176 ) const;
00177
00184 void
00185 setUTCTimeZoneOffset(
00186 short hour_offset,
00187 short minute_offset
00188 ) throw((Exception));
00189
00195 bool
00196 operator==(
00197 const GMonth& other
00198 ) const;
00199
00205 bool
00206 operator!=(
00207 const GMonth& other
00208 ) const;
00209
00213 GMonth&
00214 operator=(
00215 const GMonth& rhs
00216 );
00217
00221 GMonth&
00222 operator+=(
00223 const Duration& rhs
00224 ) throw((IT_Bus::Exception));
00225
00229 GMonth&
00230 operator-=(
00231 const Duration& rhs
00232 ) throw((IT_Bus::Exception));
00233
00234 static const QName&
00235 get_static_type();
00236
00237 private:
00238 GMonthImpl* m_impl;
00239 };
00240
00244 extern IT_AFC_API GMonth
00245 operator+(
00246 const GMonth& lhs,
00247 const Duration& rhs
00248 ) throw((IT_Bus::Exception));
00249
00253 extern IT_AFC_API GMonth
00254 operator-(
00255 const GMonth& lhs,
00256 const Duration& rhs
00257 ) throw((IT_Bus::Exception));
00258
00259 }
00260
00261 #endif