VTK  9.3.0
vtkTimeStamp.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
17#ifndef vtkTimeStamp_h
18#define vtkTimeStamp_h
19
20#include "vtkCommonCoreModule.h" // For export macro
21#include "vtkSystemIncludes.h"
22
23VTK_ABI_NAMESPACE_BEGIN
24class VTKCOMMONCORE_EXPORT vtkTimeStamp
25{
26public:
27 vtkTimeStamp() { this->ModifiedTime = 0; }
28 static vtkTimeStamp* New();
29 void Delete() { delete this; }
30
41 void Modified();
42
46 vtkMTimeType GetMTime() const { return this->ModifiedTime; }
47
49
52 bool operator>(vtkTimeStamp& ts) { return (this->ModifiedTime > ts.ModifiedTime); }
53 bool operator<(vtkTimeStamp& ts) { return (this->ModifiedTime < ts.ModifiedTime); }
55
59 operator vtkMTimeType() const { return this->ModifiedTime; }
60
61private:
62 vtkMTimeType ModifiedTime;
63};
64
65VTK_ABI_NAMESPACE_END
66#endif
67// VTK-HeaderTest-Exclude: vtkTimeStamp.h
record modification and/or execution time
bool operator<(vtkTimeStamp &ts)
Support comparisons of time stamp objects directly.
vtkMTimeType GetMTime() const
Return this object's Modified time.
void Modified()
Set this objects time to the current time.
bool operator>(vtkTimeStamp &ts)
Support comparisons of time stamp objects directly.
static vtkTimeStamp * New()
vtkTypeUInt32 vtkMTimeType
Definition vtkType.h:270