it_bus/gmonthday.h

00001 #ifndef _IT_BUS_GMONTHDAY_H_
00002 #define _IT_BUS_GMONTHDAY_H_
00003 
00004 // @Copyright 2004 IONA Technologies, Plc. All Rights Reserved.
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 GMonthDayImpl;
00022 
00027     class IT_AFC_API GMonthDay : public AnySimpleType
00028     {
00029       public:
00030         typedef IT_Reflect::ValueRef<IT_Bus::GMonthDay> IT_ReflectionType;
00031 
00040         GMonthDay(
00041             short wMonth = 1,
00042             short wDay = 1
00043         ) IT_THROW_DECL((Exception));
00044         
00052         GMonthDay(
00053             const char* value
00054         ) IT_THROW_DECL((Exception));
00055 
00063         GMonthDay(
00064             const String& value
00065         ) IT_THROW_DECL((Exception));
00066 
00070         GMonthDay(
00071             const GMonthDay& copy
00072         );
00073 
00077         virtual ~GMonthDay();
00078 
00079         virtual AnyType&
00080         copy(
00081             const AnyType& rhs
00082         );
00083 
00084         virtual void
00085         write_value(
00086             AnySimpleTypeWriter& writer
00087         ) const IT_THROW_DECL((IT_Bus::SerializationException));
00088 
00089         virtual void
00090         read_value(
00091             AnySimpleTypeReader& reader
00092         ) IT_THROW_DECL((IT_Bus::DeserializationException));
00093 
00099         virtual AnyType::Kind
00100         get_kind() const;
00101 
00107         virtual const QName&
00108         get_type() const;
00109 
00110         virtual IT_Reflect::Reflection*
00111         get_reflection()
00112             IT_THROW_DECL((IT_Reflect::ReflectException));
00113         
00114         virtual const IT_Reflect::Reflection*
00115         get_reflection() const
00116             IT_THROW_DECL((IT_Reflect::ReflectException));
00117 
00123         String
00124         to_string() const;
00125 
00131         void
00132         from_string(
00133             const String& str
00134         ) IT_THROW_DECL((Exception));
00135 
00141         short 
00142         getMonth() const;
00143 
00150         void 
00151         setMonth(
00152             short wMonth
00153         ) IT_THROW_DECL((Exception)); 
00154 
00160         short 
00161         getDay() const;
00162 
00169         void 
00170         setDay(
00171             short wDay
00172         ) IT_THROW_DECL((Exception)); 
00173 
00179         bool
00180         haveUTCTimeZoneOffset() const;
00181 
00185         void 
00186         setLocalTimeZone();
00187 
00193         void 
00194         getUTCTimeZoneOffset(
00195             short& hour_offset, 
00196             short& minute_offset
00197         ) const;
00198 
00205         void 
00206         setUTCTimeZoneOffset(
00207             short hour_offset, 
00208             short minute_offset
00209         ) IT_THROW_DECL((Exception));
00210 
00216         bool
00217         operator==(
00218             const GMonthDay& other
00219         ) const;
00220 
00226         bool
00227         operator!=(
00228             const GMonthDay& other
00229         ) const;
00230 
00234         GMonthDay&
00235         operator=(
00236             const GMonthDay& rhs
00237         );
00238 
00242         GMonthDay&
00243         operator+=(
00244             const Duration& rhs
00245         ) IT_THROW_DECL((IT_Bus::Exception));
00246 
00250         GMonthDay&
00251         operator-=(
00252             const Duration& rhs
00253         ) IT_THROW_DECL((IT_Bus::Exception));
00254 
00255         static const QName&
00256         get_static_type();
00257 
00258       private:
00259         GMonthDayImpl* m_impl;
00260     };
00261 
00265     extern IT_AFC_API GMonthDay
00266     operator+(
00267         const GMonthDay& lhs,
00268         const Duration& rhs
00269     ) IT_THROW_DECL((IT_Bus::Exception));
00270 
00274     extern IT_AFC_API GMonthDay
00275     operator-(
00276         const GMonthDay& lhs,
00277         const Duration& rhs
00278     ) IT_THROW_DECL((IT_Bus::Exception));
00279 
00280 }
00281 
00282 #endif /*_IT_BUS_GMONTHDAY_H_*/

Generated on Thu Sep 7 11:38:54 2006 for Artix by  doxygen 1.4.7