PhoenixClockMock  2.0.0
Tool to manipulate mock of clock (split, merge and get info)
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 
12 typedef std::vector<time_t> VecTime;
13 
15 class PClockMock{
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 
40 bool phoenix_saveClockMock(const VecTime & vecTime);
41 bool phoenix_loadClockMock(VecTime & vecTime);
42 
43 #endif
44 
bool phoenix_loadClockMock(VecTime &vecTime)
Load the Clock Mock.
Definition: PClockMock.cpp:22
bool phoenix_saveClockMock(const VecTime &vecTime)
Save the Clock Mock.
Definition: PClockMock.cpp:14
std::vector< time_t > VecTime
Definition: PClockMock.h:12
Mock of a clock.
Definition: PClockMock.h:15
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.
Definition: PClockMock.cpp:51
size_t p_currentTimeIndex
Index of the current time.
Definition: PClockMock.h:36
PClockMock()
Default constructor of PClockMock.
Definition: PClockMock.cpp:28
time_t now()
Get the mocked current time.
Definition: PClockMock.cpp:59
virtual ~PClockMock()
Destructor of PClockMock.
Definition: PClockMock.cpp:40
void setCurrentTime(time_t currentTime)
Set the current time to be recorded.
Definition: PClockMock.cpp:80
void copyPClockMock(const PClockMock &other)
Copy function of PClockMock.
Definition: PClockMock.cpp:89
void initialisationPClockMock()
Initialisation function of the class PClockMock.
Definition: PClockMock.cpp:96