VR-Forces 4.5 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 #include <boost/signal.hpp>
15 #include <math.h>
16 
17 namespace makVrv
18 {
19  class DtDe;
20 
26  {
27  public:
28 
29 
30  enum Month
31  {
32  January = 1,
36  May,
43  December
44  };
45 
47  DtDeTimeManager(DtDe& de);
48 
50  virtual ~DtDeTimeManager();
51 
54  //virtual void setReferenceDateAndTime(int daysAfterEpoch,double secondsInDay);
56  virtual void setReferenceDateAndTime(int year, Month month,int dayOfMonth,
57  int hours, int minutes,double seconds);
58 
60  virtual void getReferenceDateAndTime(int& year, Month& month,int& dayOfMonth,
61  int& hours, int& minutes, double& seconds) const;
62 
64  virtual void syncReferenceDateAndTime();
65 
68  virtual void setUseGlobalTimeZone(bool);
69 
71  virtual bool useGlobalTimeZone() const;
72 
75  virtual void calculateCurrentDateAndTime(int& year, Month& month, int& dayOfMonth,
76  int& hour, int& minutes,double& seconds) const;
77 
79  static bool isYearALeapYear(int year);
80 
83  static int daysInTheMonthOf(int year, Month month);
84 
86  static Month nextMonth(Month month);
87 
89  virtual double timeScale() const;
90 
93  virtual void setTimeScale(double timeScale);
94 
96  virtual void getRecord(makArchives::DtDateTimeRecord& record) const;
97 
99  boost::signal<void (int year, Month month, int day)> signal_dateChanged;
100 
102  boost::signal<void (bool)> signal_useGlobalTimeZoneChanged;
103 
104  protected:
105 
106  double timeSinceSet() const;
107 
109 
110  int myYear;
113  int myHours;
115  double mySeconds;
116 
117 
121 
124 
127  };
128 }

Document ID: Generated on Thu Mar 23 18:54:12 EDT 2017 from SVN revision 174804
Copyright © 2005-2017 VT MÄK. All Rights Reserved (www.mak.com)