VTK  9.3.20240423
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
36#ifndef vtkTimeStamp_h
37#define vtkTimeStamp_h
38
39#include "vtkCommonCoreModule.h" // For export macro
40#include "vtkSystemIncludes.h"
41
42VTK_ABI_NAMESPACE_BEGIN
43class VTKCOMMONCORE_EXPORT vtkTimeStamp
44{
45public:
46 vtkTimeStamp() { this->ModifiedTime = 0; }
47 static vtkTimeStamp* New();
48 void Delete() { delete this; }
49
60 void Modified();
61
65 vtkMTimeType GetMTime() const { return this->ModifiedTime; }
66
68
71 bool operator>(vtkTimeStamp& ts) { return (this->ModifiedTime > ts.ModifiedTime); }
72 bool operator<(vtkTimeStamp& ts) { return (this->ModifiedTime < ts.ModifiedTime); }
74
78 operator vtkMTimeType() const { return this->ModifiedTime; }
79
80private:
81 vtkMTimeType ModifiedTime;
82};
83
84VTK_ABI_NAMESPACE_END
85#endif
86// 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