PhoenixClock  0.4.0
Library wrapping the usage of system's clock, allowing to use clock mock-ups
Loading...
Searching...
No Matches
PClockMock.h
Go to the documentation of this file.
1/***************************************
2 Auteur : Pierre Aubert
3 Mail : pierre.aubert@lapp.in2p3.fr
4 Licence : CeCILL-C
5****************************************/
6
7#ifndef __PCLOCKMOCK_H__
8#define __PCLOCKMOCK_H__
9
10#include "data_all.h"
11
12typedef std::vector<time_t> VecTime;
13
16 public:
17 PClockMock();
18 PClockMock(const PClockMock & other);
19 virtual ~PClockMock();
20 PClockMock & operator = (const PClockMock & other);
21
22 time_t now();
23 void setCurrentTime(time_t currentTime);
24
25 protected:
26 void copyPClockMock(const PClockMock & other);
27
28 private:
30
37};
38
39
40bool phoenix_saveClockMock(const VecTime & vecTime);
41bool phoenix_loadClockMock(VecTime & vecTime);
42
43#endif
44
bool phoenix_loadClockMock(VecTime &vecTime)
Load the Clock Mock.
bool phoenix_saveClockMock(const VecTime &vecTime)
Save the Clock Mock.
std::vector< time_t > VecTime
Definition PClockMock.h:12
bool p_isRecordMode
True if the clock mock is in record mode.
Definition PClockMock.h:32
VecTime p_vecTime
Vector of recorded time.
Definition PClockMock.h:34
PClockMock & operator=(const PClockMock &other)
Definition of equal operator of PClockMock.
size_t p_currentTimeIndex
Index of the current time.
Definition PClockMock.h:36
PClockMock()
Default constructor of PClockMock.
time_t now()
Get the mocked current time.
virtual ~PClockMock()
Destructor of PClockMock.
void setCurrentTime(time_t currentTime)
Set the current time to be recorded.
void copyPClockMock(const PClockMock &other)
Copy function of PClockMock.
void initialisationPClockMock()
Initialisation function of the class PClockMock.