VTK  9.0.20210409
vtkTimeStamp.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkTimeStamp.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
26 #ifndef vtkTimeStamp_h
27 #define vtkTimeStamp_h
28 
29 #include "vtkCommonCoreModule.h" // For export macro
30 #include "vtkSystemIncludes.h"
31 
32 class VTKCOMMONCORE_EXPORT vtkTimeStamp
33 {
34 public:
35  vtkTimeStamp() { this->ModifiedTime = 0; }
36  static vtkTimeStamp* New();
37  void Delete() { delete this; }
38 
49  void Modified();
50 
54  vtkMTimeType GetMTime() const { return this->ModifiedTime; }
55 
57 
60  bool operator>(vtkTimeStamp& ts) { return (this->ModifiedTime > ts.ModifiedTime); }
61  bool operator<(vtkTimeStamp& ts) { return (this->ModifiedTime < ts.ModifiedTime); }
63 
67  operator vtkMTimeType() const { return this->ModifiedTime; }
68 
69 private:
70  vtkMTimeType ModifiedTime;
71 };
72 
73 #endif
74 // VTK-HeaderTest-Exclude: vtkTimeStamp.h
vtkTimeStamp
record modification and/or execution time
Definition: vtkTimeStamp.h:33
vtkTimeStamp::Delete
void Delete()
Definition: vtkTimeStamp.h:37
vtkTimeStamp::operator>
bool operator>(vtkTimeStamp &ts)
Support comparisons of time stamp objects directly.
Definition: vtkTimeStamp.h:60
vtkTimeStamp::New
static vtkTimeStamp * New()
vtkTimeStamp::GetMTime
vtkMTimeType GetMTime() const
Return this object's Modified time.
Definition: vtkTimeStamp.h:54
vtkTimeStamp::Modified
void Modified()
Set this objects time to the current time.
vtkTimeStamp::operator<
bool operator<(vtkTimeStamp &ts)
Definition: vtkTimeStamp.h:61
vtkTimeStamp::vtkTimeStamp
vtkTimeStamp()
Definition: vtkTimeStamp.h:35
vtkSystemIncludes.h
vtkMTimeType
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:293