Date_Time.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //==========================================================================
00004 /**
00005  *  @file    Date_Time.h
00006  *
00007  *  Date_Time.h,v 4.22 2005/10/28 16:14:52 ossama Exp
00008  *
00009  *  @author Tim Harrison (harrison@cs.wustl.edu) (and he's darn proud of this ;-))
00010  *
00011  */
00012 //==========================================================================
00013 
00014 #ifndef ACE_DATE_TIME_H
00015 #define ACE_DATE_TIME_H
00016 #include /**/ "ace/pre.h"
00017 
00018 #include "ace/ACE_export.h"
00019 
00020 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00021 # pragma once
00022 #endif /* ACE_LACKS_PRAGMA_ONCE */
00023 
00024 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
00025 
00026 class ACE_Time_Value;
00027 
00028 /**
00029  * @class ACE_Date_Time
00030  *
00031  * @brief System independent representation of date and time.
00032  */
00033 class ACE_Export ACE_Date_Time
00034 {
00035 public:
00036   /// Constructor initializes current time/date info.
00037   ACE_Date_Time (void);
00038 
00039   /// Constructor initializes with the given ACE_Time_Value
00040   explicit ACE_Date_Time (const ACE_Time_Value& timevalue);
00041 
00042   /// Constructor with init values, no check for validy
00043   /// Set/get portions of ACE_Date_Time, no check for validity.
00044   ACE_Date_Time (long day,
00045                  long month = 0,
00046                  long year = 0,
00047                  long hour = 0,
00048                  long minute = 0,
00049                  long second = 0,
00050                  long microsec = 0,
00051                  long wday = 0);
00052 
00053   /// Update to the current time/date.
00054   void update (void);
00055 
00056   /// Update to the given ACE_Time_Value
00057   void update (const ACE_Time_Value& timevalue);
00058 
00059   /// Get day.
00060   long day (void) const;
00061 
00062   /// Set day.
00063   void day (long day);
00064 
00065   /// Get month.
00066   long month (void) const;
00067 
00068   /// Set month.
00069   void month (long month);
00070 
00071   /// Get year.
00072   long year (void) const;
00073 
00074   /// Set year.
00075   void year (long year);
00076 
00077   /// Get hour.
00078   long hour (void) const;
00079 
00080   /// Set hour.
00081   void hour (long hour);
00082 
00083   /// Get minute.
00084   long minute (void) const;
00085 
00086   /// Set minute.
00087   void minute (long minute);
00088 
00089   /// Get second.
00090   long second (void) const;
00091 
00092   /// Set second.
00093   void second (long second);
00094 
00095   /// Get microsec.
00096   long microsec (void) const;
00097 
00098   /// Set microsec.
00099   void microsec (long microsec);
00100 
00101   /// Get weekday.
00102   long weekday (void) const;
00103 
00104   /// Set weekday.
00105   void weekday (long wday);
00106 
00107 private:
00108   long day_;
00109   long month_;
00110   long year_;
00111   long hour_;
00112   long minute_;
00113   long second_;
00114   long microsec_;
00115   long wday_;
00116 };
00117 
00118 ACE_END_VERSIONED_NAMESPACE_DECL
00119 
00120 #if defined (__ACE_INLINE__)
00121 #include "ace/Date_Time.inl"
00122 #endif /* __ACE_INLINE__ */
00123 
00124 #include /**/ "ace/post.h"
00125 #endif /* ACE_DATE_TIME_H */

Generated on Thu Nov 9 09:41:49 2006 for ACE by doxygen 1.3.6