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
23#ifdef ALBA_USE_VTK
24class vtkTimeStamp;
25#endif
26
37class ALBA_EXPORT albaMTime : public albaBase
38{
39public:
40 albaMTime() {m_ModifiedTime = 0;};
41
42
43
44 virtual const char *GetTypeName() {return "albaMTime";};
45
55 void Modified();
56
58 unsigned long int GetMTime() const;
59
61 int operator>(albaMTime& ts) {return (GetMTime() > ts.GetMTime());};
62 int operator<(albaMTime& ts) {return (GetMTime() < ts.GetMTime());};
63
65 operator unsigned long() {return GetMTime();};
66
67private:
68 unsigned long m_ModifiedTime;
69};
70
71#endif
72
albaBase - the pourpose of this class is just to groups utilities classes
Definition: albaBase.h:27
albaMTime - record modification timestamp.
Definition: albaMTime.h:38
void Modified()
Update this object modification time.
unsigned long int GetMTime() const
Return this object's Modified time.
albaMTime()
Definition: albaMTime.h:40
int operator<(albaMTime &ts)
Definition: albaMTime.h:62
virtual const char * GetTypeName()
Definition: albaMTime.h:44
int operator>(albaMTime &ts)
Support comparisons of time stamp objects directly.
Definition: albaMTime.h:61