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
26#ifndef vtkTimeStamp_h
27#define vtkTimeStamp_h
28
29#include "vtkCommonCoreModule.h" // For export macro
30#include "vtkSystemIncludes.h"
31
32VTK_ABI_NAMESPACE_BEGIN
33class VTKCOMMONCORE_EXPORT vtkTimeStamp
34{
35public:
36 vtkTimeStamp() { this->ModifiedTime = 0; }
37 static vtkTimeStamp* New();
38 void Delete() { delete this; }
39
50 void Modified();
51
55 vtkMTimeType GetMTime() const { return this->ModifiedTime; }
56
58
61 bool operator>(vtkTimeStamp& ts) { return (this->ModifiedTime > ts.ModifiedTime); }
62 bool operator<(vtkTimeStamp& ts) { return (this->ModifiedTime < ts.ModifiedTime); }
64
68 operator vtkMTimeType() const { return this->ModifiedTime; }
69
70private:
71 vtkMTimeType ModifiedTime;
72};
73
74VTK_ABI_NAMESPACE_END
75#endif
76// 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