VR-Forces 4.1.1 Class Documentation
DtDeTimeManager.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2008 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 /******************************************************************************
6 ** $RCSfile: DtDeTimeManager.h,v $ $Revision: 1.8 $ $State: Exp $
7 ******************************************************************************/
8 
12 
13 #ifndef DtDeTimeManager_H_
14 #define DtDeTimeManager_H_
15 
16 #include <vrvCore/vrvCore.h>
18 
19 #include <math.h>
20 
21 namespace makVrv
22 {
23  class DtDe;
24 
30  {
31  public:
32 
33 
34  enum Month
35  {
36  January = 1,
40  May,
47  December
48  };
49 
51  DtDeTimeManager(DtDe& de);
52 
54  virtual ~DtDeTimeManager();
55 
58  //virtual void setReferenceDateAndTime(int daysAfterEpoch,double secondsInDay);
60  virtual void setReferenceDateAndTime(int year, Month month,int dayOfMonth,
61  int hours, int minutes,double seconds);
62 
64  virtual void getReferenceDateAndTime(int& year, Month& month,int& dayOfMonth,
65  int& hours, int& minutes, double& seconds) const;
66 
68  virtual void syncReferenceDateAndTime();
69 
72  virtual void calculateCurrentDateAndTime(int& year, Month& month, int& dayOfMonth,
73  int& hour, int& minutes,double& seconds) const;
74 
76  static bool isYearALeapYear(int year);
77 
80  static int daysInTheMonthOf(int year, Month month);
81 
83  static Month nextMonth(Month month);
84 
86  virtual double timeScale() const;
87 
90  virtual void setTimeScale(double timeScale);
91 
93  virtual void getRecord(makArchives::DtDateTimeRecord& record) const;
94 
95  protected:
96 
97  double timeSinceSet() const;
98 
100 
101  int myYear;
104  int myHours;
106  double mySeconds;
107 
108 
112 
113 
116  };
117 }
118 
119 #endif
120 

Document ID: Generated on Mon Apr 8 19:24:01 EDT 2013 from SVN revision 125877
Copyright © 2005-2013 VT MÄK. All Rights Reserved (www.mak.com)