Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

Date_Time.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //==========================================================================
00004 /**
00005  *  @file    Date_Time.h
00006  *
00007  *  $Id: Date_Time.h,v 1.1.1.4 2003/02/21 18:36:32 chad 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 #include "ace/OS.h"
00025 
00026 /**
00027  * @class ACE_Date_Time
00028  *
00029  * @brief System independent representation of date and time.
00030  */
00031 class ACE_Export ACE_Date_Time
00032 {
00033 public:
00034   /// Constructor initializes current time/date info.
00035   ACE_Date_Time (void);
00036 
00037   /// Constructor with init values, no check for validy
00038   /// Set/get portions of ACE_Date_Time, no check for validity.
00039   ACE_Date_Time (long day,
00040                  long month = 0,
00041                  long year = 0,
00042                  long hour = 0,
00043                  long minute = 0,
00044                  long second = 0,
00045                  long microsec = 0,
00046                  long wday = 0);
00047 
00048   /// Update to the current time/date.
00049   void update (void);
00050 
00051   /// Update to the given ACE_Time_Value
00052   void update (const ACE_Time_Value& timevalue);
00053 
00054   /// Get day.
00055   long day (void) const;
00056 
00057   /// Set day.
00058   void day (long day);
00059 
00060   /// Get month.
00061   long month (void) const;
00062 
00063   /// Set month.
00064   void month (long month);
00065 
00066   /// Get year.
00067   long year (void) const;
00068 
00069   /// Set year.
00070   void year (long year);
00071 
00072   /// Get hour.
00073   long hour (void) const;
00074 
00075   /// Set hour.
00076   void hour (long hour);
00077 
00078   /// Get minute.
00079   long minute (void) const;
00080 
00081   /// Set minute.
00082   void minute (long minute);
00083 
00084   /// Get second.
00085   long second (void) const;
00086 
00087   /// Set second.
00088   void second (long second);
00089 
00090   /// Get microsec.
00091   long microsec (void) const;
00092 
00093   /// Set microsec.
00094   void microsec (long microsec);
00095 
00096   /// Get weekday.
00097   long weekday (void) const;
00098 
00099   /// Set weekday.
00100   void weekday (long wday);
00101 
00102 private:
00103   long day_;
00104   long month_;
00105   long year_;
00106   long hour_;
00107   long minute_;
00108   long second_;
00109   long microsec_;
00110   long wday_;
00111 };
00112 
00113 #if !defined (ACE_LACKS_INLINE_FUNCTIONS)
00114 #include "ace/Date_Time.i"
00115 #endif
00116 
00117 #include "ace/post.h"
00118 #endif /* ACE_DATE_TIME_H */

Generated on Mon Jun 16 11:19:33 2003 for ACE by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002