VTK  9.2.5
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 =========================================================================*/
48 #ifndef vtkTimeStamp_h
49 #define vtkTimeStamp_h
50 
51 #include "vtkCommonCoreModule.h" // For export macro
52 #include "vtkSystemIncludes.h"
53 
54 class VTKCOMMONCORE_EXPORT vtkTimeStamp
55 {
56 public:
57  vtkTimeStamp() { this->ModifiedTime = 0; }
58  static vtkTimeStamp* New();
59  void Delete() { delete this; }
60 
71  void Modified();
72 
76  vtkMTimeType GetMTime() const { return this->ModifiedTime; }
77 
79 
82  bool operator>(vtkTimeStamp& ts) { return (this->ModifiedTime > ts.ModifiedTime); }
83  bool operator<(vtkTimeStamp& ts) { return (this->ModifiedTime < ts.ModifiedTime); }
85 
89  operator vtkMTimeType() const { return this->ModifiedTime; }
90 
91 private:
92  vtkMTimeType ModifiedTime;
93 };
94 
95 #endif
96 // VTK-HeaderTest-Exclude: vtkTimeStamp.h
record modification and/or execution time
Definition: vtkTimeStamp.h:55
bool operator<(vtkTimeStamp &ts)
Support comparisons of time stamp objects directly.
Definition: vtkTimeStamp.h:83
vtkMTimeType GetMTime() const
Return this object's Modified time.
Definition: vtkTimeStamp.h:76
void Delete()
Definition: vtkTimeStamp.h:59
void Modified()
Set this objects time to the current time.
bool operator>(vtkTimeStamp &ts)
Support comparisons of time stamp objects directly.
Definition: vtkTimeStamp.h:82
static vtkTimeStamp * New()
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:287