ITK  4.3.0
Insight Segmentation and Registration Toolkit
itkTimeStamp.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0.txt
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *=========================================================================*/
18 /*=========================================================================
19  *
20  * Portions of this file are subject to the VTK Toolkit Version 3 copyright.
21  *
22  * Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
23  *
24  * For complete copyright, license and disclaimer of warranty information
25  * please refer to the NOTICE file at the top of the ITK source tree.
26  *
27  *=========================================================================*/
28 #ifndef __itkTimeStamp_h
29 #define __itkTimeStamp_h
30 
31 #include "itkMacro.h"
32 #include "itkIntTypes.h"
33 
34 namespace itk
35 {
58 class ITKCommon_EXPORT TimeStamp
59 {
60 public:
62  typedef TimeStamp Self;
63 
66  static Self * New();
67 
71  { m_ModifiedTime = 0; }
72 
74  void Delete()
75  { delete this; }
76 
78  static const char * GetNameOfClass()
79  { return "TimeStamp"; }
80 
88  void Modified();
89 
91  ModifiedTimeType GetMTime() const
92  { return m_ModifiedTime; }
93 
95  bool operator>(TimeStamp & ts)
96  { return ( m_ModifiedTime > ts.m_ModifiedTime ); }
97  bool operator<(TimeStamp & ts)
98  { return ( m_ModifiedTime < ts.m_ModifiedTime ); }
100 
102  operator ModifiedTimeType() const
103  { return m_ModifiedTime; }
104 
107  const Self & operator=( const Self & other );
108 
109 private:
111 };
112 } // end namespace itk
113 
114 #endif
115