VR-Forces 4.3 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DtDeTimeManager.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2014 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvCore/vrvCore.h>
14 
15 #include <math.h>
16 
17 #include <boost/signal.hpp>
18 
19 namespace makVrv
20 {
21  class DtDe;
22 
28  {
29  public:
30 
31 
32  enum Month
33  {
34  January = 1,
38  May,
45  December
46  };
47 
49  DtDeTimeManager(DtDe& de);
50 
52  virtual ~DtDeTimeManager();
53 
56  //virtual void setReferenceDateAndTime(int daysAfterEpoch,double secondsInDay);
58  virtual void setReferenceDateAndTime(int year, Month month,int dayOfMonth,
59  int hours, int minutes,double seconds);
60 
62  virtual void getReferenceDateAndTime(int& year, Month& month,int& dayOfMonth,
63  int& hours, int& minutes, double& seconds) const;
64 
66  virtual void syncReferenceDateAndTime();
67 
70  virtual void setUseGlobalTimeZone(bool);
71 
73  virtual bool useGlobalTimeZone() const;
74 
77  virtual void calculateCurrentDateAndTime(int& year, Month& month, int& dayOfMonth,
78  int& hour, int& minutes,double& seconds) const;
79 
81  static bool isYearALeapYear(int year);
82 
85  static int daysInTheMonthOf(int year, Month month);
86 
88  static Month nextMonth(Month month);
89 
91  virtual double timeScale() const;
92 
95  virtual void setTimeScale(double timeScale);
96 
98  virtual void getRecord(makArchives::DtDateTimeRecord& record) const;
99 
101  boost::signal<void (int year, Month month, int day)> signal_dateChanged;
102 
104  boost::signal<void (bool)> signal_useGlobalTimeZoneChanged;
105 
106  protected:
107 
108  double timeSinceSet() const;
109 
111 
112  int myYear;
115  int myHours;
117  double mySeconds;
118 
119 
123 
126 
129  };
130 }

Document ID: Generated on Wed Mar 11 21:20:57 EDT 2015 from SVN revision 150940
Copyright © 2005-2014 VT MÄK. All Rights Reserved (www.mak.com)