![]() |
PhoenixClockMock
2.0.0
Tool to manipulate mock of clock (split, merge and get info)
|
Mock of a clock. More...
#include <PClockMock.h>
Public Member Functions | |
time_t | now () |
Get the mocked current time. More... | |
PClockMock & | operator= (const PClockMock &other) |
Definition of equal operator of PClockMock. More... | |
PClockMock () | |
Default constructor of PClockMock. More... | |
PClockMock (const PClockMock &other) | |
Copy constructor of PClockMock. More... | |
void | setCurrentTime (time_t currentTime) |
Set the current time to be recorded. More... | |
virtual | ~PClockMock () |
Destructor of PClockMock. More... | |
Protected Member Functions | |
void | copyPClockMock (const PClockMock &other) |
Copy function of PClockMock. More... | |
Private Member Functions | |
void | initialisationPClockMock () |
Initialisation function of the class PClockMock. More... | |
Private Attributes | |
size_t | p_currentTimeIndex |
Index of the current time. More... | |
bool | p_isRecordMode |
True if the clock mock is in record mode. More... | |
VecTime | p_vecTime |
Vector of recorded time. More... | |
Mock of a clock.
Definition at line 15 of file PClockMock.h.
PClockMock::PClockMock | ( | ) |
Default constructor of PClockMock.
Definition at line 28 of file PClockMock.cpp.
References initialisationPClockMock().
PClockMock::PClockMock | ( | const PClockMock & | other | ) |
Copy constructor of PClockMock.
other | : class to copy |
Definition at line 35 of file PClockMock.cpp.
References copyPClockMock().
|
virtual |
Destructor of PClockMock.
Definition at line 40 of file PClockMock.cpp.
References p_isRecordMode, p_vecTime, and phoenix_saveClockMock().
|
protected |
Copy function of PClockMock.
other | : class to copy |
Definition at line 89 of file PClockMock.cpp.
References p_currentTimeIndex, p_isRecordMode, and p_vecTime.
Referenced by operator=(), and PClockMock().
|
private |
Initialisation function of the class PClockMock.
Definition at line 96 of file PClockMock.cpp.
References p_currentTimeIndex, and p_isRecordMode.
Referenced by PClockMock().
time_t PClockMock::now | ( | ) |
Get the mocked current time.
Definition at line 59 of file PClockMock.cpp.
References p_currentTimeIndex, p_vecTime, and phoenix_loadClockMock().
PClockMock & PClockMock::operator= | ( | const PClockMock & | other | ) |
Definition of equal operator of PClockMock.
other | : class to copy |
Definition at line 51 of file PClockMock.cpp.
References copyPClockMock().
void PClockMock::setCurrentTime | ( | time_t | currentTime | ) |
Set the current time to be recorded.
currentTime | : current time to be recorded |
Definition at line 80 of file PClockMock.cpp.
References p_isRecordMode, and p_vecTime.
|
private |
Index of the current time.
Definition at line 36 of file PClockMock.h.
Referenced by copyPClockMock(), initialisationPClockMock(), and now().
|
private |
True if the clock mock is in record mode.
Definition at line 32 of file PClockMock.h.
Referenced by copyPClockMock(), initialisationPClockMock(), setCurrentTime(), and ~PClockMock().
|
private |
Vector of recorded time.
Definition at line 34 of file PClockMock.h.
Referenced by copyPClockMock(), now(), setCurrentTime(), and ~PClockMock().