it_bus/gday.h

00001 #ifndef _IT_BUS_GDAY_H_
00002 #define _IT_BUS_GDAY_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 GDayImpl;
00022 
00027     class IT_AFC_API GDay : public AnySimpleType
00028     {
00029       public:
00030         typedef IT_Reflect::ValueRef<IT_Bus::GDay> IT_ReflectionType;
00031 
00039         GDay(
00040             short wDay = 1
00041         ) IT_THROW_DECL((Exception));
00042         
00050         GDay(
00051             const char* value
00052         ) IT_THROW_DECL((Exception));
00053 
00061         GDay(
00062             const String& value
00063         ) IT_THROW_DECL((Exception));
00064 
00068         GDay(
00069             const GDay& copy
00070         );
00071 
00075         virtual ~GDay();
00076 
00077         virtual AnyType&
00078         copy(
00079             const AnyType& rhs
00080         );
00081 
00082         virtual void
00083         write_value(
00084             AnySimpleTypeWriter& writer
00085         ) const IT_THROW_DECL((IT_Bus::SerializationException));
00086 
00087         virtual void
00088         read_value(
00089             AnySimpleTypeReader& reader
00090         ) IT_THROW_DECL((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             IT_THROW_DECL((IT_Reflect::ReflectException));
00111         
00112         virtual const IT_Reflect::Reflection*
00113         get_reflection() const
00114             IT_THROW_DECL((IT_Reflect::ReflectException));
00115 
00121         String
00122         to_string() const;
00123 
00129         void
00130         from_string(
00131             const String& str
00132         ) IT_THROW_DECL((Exception));
00133 
00134         short 
00135         get() const;
00136 
00137         void 
00138         set(
00139             short w
00140         ) IT_THROW_DECL((Exception)); 
00141 
00147         short 
00148         getDay() const;
00149 
00156         void 
00157         setDay(
00158             short wDay
00159         ) IT_THROW_DECL((Exception)); 
00160 
00166         bool
00167         haveUTCTimeZoneOffset() const;
00168 
00172         void 
00173         setLocalTimeZone();
00174 
00180         void 
00181         getUTCTimeZoneOffset(
00182             short& hour_offset, 
00183             short& minute_offset
00184         ) const;
00185 
00192         void 
00193         setUTCTimeZoneOffset(
00194             short hour_offset, 
00195             short minute_offset
00196         ) IT_THROW_DECL((Exception));
00197 
00203         bool
00204         operator==(
00205             const GDay& other
00206         ) const;
00207 
00213         bool
00214         operator!=(
00215             const GDay& other
00216         ) const;
00217 
00221         GDay&
00222         operator=(
00223             const GDay& rhs
00224         );
00225 
00229         GDay&
00230         operator+=(
00231             const Duration& rhs
00232         ) IT_THROW_DECL((IT_Bus::Exception));
00233 
00237         GDay&
00238         operator-=(
00239             const Duration& rhs
00240         ) IT_THROW_DECL((IT_Bus::Exception));
00241 
00242         static const QName&
00243         get_static_type();
00244 
00245       private:
00246         GDayImpl* m_impl;
00247     };
00248 
00252     extern IT_AFC_API GDay
00253     operator+(
00254         const GDay& lhs,
00255         const Duration& rhs
00256     ) IT_THROW_DECL((IT_Bus::Exception));
00257 
00261     extern IT_AFC_API GDay
00262     operator-(
00263         const GDay& lhs,
00264         const Duration& rhs
00265     ) IT_THROW_DECL((IT_Bus::Exception));
00266 
00267 }
00268 
00269 #endif /*_IT_BUS_GDAY_H_*/

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