AGXDynamics
2.35.0.2
Date.h
Go to the documentation of this file.
1
/*
2
Copyright 2007-2022. Algoryx Simulation AB.
3
4
All AGX source code, intellectual property, documentation, sample code,
5
tutorials, scene files and technical white papers, is copyrighted, proprietary
6
and confidential material of Algoryx Simulation AB. You may not download, read,
7
store, distribute, publish, copy or otherwise disseminate, use or expose this
8
material unless having a written signed agreement with Algoryx Simulation AB, or having been
9
advised so by Algoryx Simulation AB for a time limited evaluation, or having purchased a
10
valid commercial license from Algoryx Simulation AB.
11
12
Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13
from using this software, unless otherwise stated in written agreements with
14
Algoryx Simulation AB.
15
*/
16
17
#ifndef AGX_DATE_H
18
#define AGX_DATE_H
19
20
#include <
agx/String.h
>
21
#include <
agx/Object.h
>
22
23
24
namespace
agx
25
{
26
AGX_DECLARE_POINTER_TYPES
(
Date
);
27
class
AGXCORE_EXPORT
Date
:
public
agx::Object
28
{
29
public
:
39
struct
TimeVal
{
40
long
tv_sec
;
/* seconds */
41
long
tv_usec
;
/* and microseconds */
42
};
43
Date
();
44
Date
(
UInt
seconds,
UInt
microSeconds = 0);
45
46
48
agx::String
toStringDateAndTime()
const
;
49
51
agx::String
toStringTime()
const
;
52
53
tm& getTmTime();
54
const
tm& getTmTime()
const
;
55
56
TimeVal
& getTimevalTime();
57
const
TimeVal
& getTimevalTime()
const
;
58
59
long
long
getMilliseconds()
const
;
60
61
bool
operator>(
const
Date
& other)
const
;
62
63
void
update();
64
65
72
static
bool
convertDateToISO(
const
agx::String
& compileDate,
agx::String
& isoDate);
73
74
75
protected
:
76
virtual
~
Date
();
77
78
79
private
:
80
TimeVal
m_timevalTime;
81
tm m_tmTime;
82
};
83
84
85
/* Implementation */
86
AGX_FORCE_INLINE
tm&
Date::getTmTime
() {
return
m_tmTime; }
87
AGX_FORCE_INLINE
const
tm&
Date::getTmTime
()
const
{
return
m_tmTime; }
88
89
AGX_FORCE_INLINE
Date::TimeVal
&
Date::getTimevalTime
() {
return
m_timevalTime; }
90
AGX_FORCE_INLINE
const
Date::TimeVal
&
Date::getTimevalTime
()
const
{
return
m_timevalTime; }
91
92
}
93
94
95
#endif
/* AGX_DATE_H */
AGXCORE_EXPORT
#define AGXCORE_EXPORT
agx::Date::getTimevalTime
TimeVal & getTimevalTime()
Definition:
Date.h:89
agx::Date::TimeVal::tv_sec
long tv_sec
Definition:
Date.h:40
agx
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
Definition:
AddedMassInteraction.h:22
agx::Date::TimeVal
A copy of struct 'timeval' from BSD file sys/time.h.
Definition:
Date.h:39
agx::Date::TimeVal::tv_usec
long tv_usec
Definition:
Date.h:41
Object.h
agx::Object
agx::Object is a refcounted object with a name.
Definition:
Object.h:59
AGX_DECLARE_POINTER_TYPES
#define AGX_DECLARE_POINTER_TYPES(type)
Definition:
Referenced.h:248
agx::UInt
uint32_t UInt
Definition:
Integer.h:34
String.h
agx::AgXString< std::string >
agx::Date
Definition:
Date.h:27
agx::Date::getTmTime
tm & getTmTime()
Definition:
Date.h:86
AGX_FORCE_INLINE
#define AGX_FORCE_INLINE
Definition:
macros.h:58
include
agx
Date.h
Generated on Mon Jan 30 2023 15:44:11 for AGXDynamics by
1.8.17