ALBA
albaMTime.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: ALBA (Agile Library for Biomedical Applications)
4 Module: albaMTime
5 Authors: Marco Petrone, inspired to vtkTimeStamp (www.vtk.org)
6
7 Copyright (c) BIC
8 All rights reserved. See Copyright.txt or
9
10
11 This software is distributed WITHOUT ANY WARRANTY; without even
12 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
13 PURPOSE. See the above copyright notice for more information.
14
15=========================================================================*/
16
17#ifndef __albaMTime_h
18#define __albaMTime_h
19
20#include "albaConfigure.h"
21#include "albaBase.h"
22#include "vtkType.h"
23
24#ifdef ALBA_USE_VTK
25class vtkTimeStamp;
26#endif
27
38class ALBA_EXPORT albaMTime : public albaBase
39{
40public:
41 albaMTime() {m_ModifiedTime = 0;};
42
43
44
45 virtual const char *GetTypeName() {return "albaMTime";};
46
56 void Modified();
57
59 vtkMTimeType GetMTime() const;
60
62 int operator>(albaMTime& ts) {return (GetMTime() > ts.GetMTime());};
63 int operator<(albaMTime& ts) {return (GetMTime() < ts.GetMTime());};
64
66 operator vtkMTimeType() {return GetMTime();};
67
68private:
69 vtkMTimeType m_ModifiedTime;
70};
71
72#endif
73
albaBase - the pourpose of this class is just to groups utilities classes
Definition: albaBase.h:27
albaMTime - record modification timestamp.
Definition: albaMTime.h:39
vtkMTimeType GetMTime() const
Return this object's Modified time.
void Modified()
Update this object modification time.
albaMTime()
Definition: albaMTime.h:41
int operator<(albaMTime &ts)
Definition: albaMTime.h:63
virtual const char * GetTypeName()
Definition: albaMTime.h:45
int operator>(albaMTime &ts)
Support comparisons of time stamp objects directly.
Definition: albaMTime.h:62