MAK Data Logger API Documentation for DIS
absoluteTime.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 1992-2010 VT MAK
3 ** All rights reserved.
4 ******************************************************************************/
5 
11 
12 #ifndef absoluteTime_H_
13 #define absoluteTime_H_
14 
15 #include "lgrUtil.h"
16 #include <iosfwd>
17 #include <vlutil/vlString.h>
18 
19 namespace MAKLogger
20 {
21 
23 
29  {
30  public:
32  DtRelativeTime(double reltime);
33 
35  DtRelativeTime(const DtAbsoluteTime& time1,const DtAbsoluteTime& time2);
36 
38  DtRelativeTime operator+(const DtRelativeTime& relTime) const;
39 
41  DtRelativeTime operator-(const DtRelativeTime& relTime) const;
42 
44  bool operator==(const DtRelativeTime&) const;
45  bool operator!=(const DtRelativeTime&) const;
46  bool operator< (const DtRelativeTime&) const;
47  bool operator> (const DtRelativeTime&) const;
48  bool operator<=(const DtRelativeTime&) const;
49  bool operator>=(const DtRelativeTime&) const;
50 
51  double hours() const;
52  double minutes() const;
53  double seconds() const;
54 
56  long hourPart() const;
57 
59  long minutePart() const;
60 
62  long secondPart() const;
63 
65  long milisecondPart() const;
66 
68  DtString toString(int percision = 0) const;
69 
73  static double parseString(const DtString& timeString);
74 
75  protected:
76  double myTime;
77  };
78 
83  {
84  public:
87  DtAbsoluteTime(double absTime);
88 
90  void offset(const DtRelativeTime& relTime);
91 
93  DtRelativeTime relative(const DtAbsoluteTime& time2) const;
94 
97  DtAbsoluteTime operator+(const DtRelativeTime& relTime) const;
99  DtAbsoluteTime operator-(const DtRelativeTime& relTime) const;
101  DtAbsoluteTime& operator+=(const DtRelativeTime& relTime);
103  DtAbsoluteTime& operator-=(const DtRelativeTime& relTime);
104 
105  DtRelativeTime operator-(const DtAbsoluteTime& absTime) const;
106 
108  bool operator==(const DtAbsoluteTime&) const;
109  bool operator!=(const DtAbsoluteTime&) const;
110  bool operator< (const DtAbsoluteTime&) const;
111  bool operator> (const DtAbsoluteTime&) const;
112  bool operator<=(const DtAbsoluteTime&) const;
113  bool operator>=(const DtAbsoluteTime&) const;
114 
117  double hours() const;
118 
121  double minutes() const;
122 
125  double seconds() const;
126 
128  long hourPart() const;
129 
131  long minutePart() const;
132 
134  long secondPart() const;
135 
137  long milisecondPart() const;
138 
140  DtString toString(int percision = 0) const;
141 
146  static double parseString(const DtString& timeString);
147 
148  protected:
149  double myTime;
150  };
151 
152  DT_DLL_LGRUTIL std::ostream& operator<<(std::ostream&,const DtAbsoluteTime&);
153 
154 }
155 
156 #endif

Document ID: Generated on Thu Apr 10 18:53:01 EDT 2014 from SVN revision 138105
Copyright © 2005-2012 VT MÄK. All Rights Reserved (www.mak.com)