VR-Forces 4.1.1 Class Documentation
Home
Modules
Namespaces
Classes
Files
Examples
Behavior Models
File List
File Members
include
vrvCore
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
>
17
#include <
makArchives/DtDateTimeRecord.h
>
18
19
#include <math.h>
20
21
namespace
makVrv
22
{
23
class
DtDe;
24
29
class
DT_DLL_VRVCORE
DtDeTimeManager
30
{
31
public
:
32
33
34
enum
Month
35
{
36
January = 1,
37
February
,
38
March
,
39
April
,
40
May
,
41
June
,
42
July
,
43
August
,
44
September
,
45
October
,
46
November
,
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
99
DtDe
&
myDe
;
100
101
int
myYear
;
102
Month
myMonth
;
103
int
myDayOfTheMonth
;
104
int
myHours
;
105
int
myMinutes
;
106
double
mySeconds
;
107
108
111
double
mySimulationTimeAtSet
;
112
113
115
double
myTimeScaleFactor
;
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
)