![]() |
|
PhoenixClock
2.2.0
Library wrapping the usage of system's clock, allowing to use clock mock-ups
|
Mock of a clock. More...
#include <PClockMockFile.h>
Public Member Functions | |
| void | close () |
| Close the PClockMockFile. | |
| time_t | now () |
| Get the mocked current time. | |
| PClockMockFile () | |
| Default constructor of PClockMockFile. | |
| void | setCurrentTime (time_t currentTime) |
| Set the current time to be recorded. | |
| void | setMockPrefix (const std::string &mockPrefix) |
| Set the mock directory. | |
| void | sleep (EllapsedTime ellapsedTime) const |
| Sleep for the given ellapsed time. | |
| virtual | ~PClockMockFile () |
| Destructor of PClockMockFile. | |
Private Member Functions | |
| void | initialisationPClockMockFile () |
| Initialisation function of the class PClockMockFile. | |
Private Attributes | |
| PGenericFileMock< time_t > | p_mock |
| Mock handler. | |
Mock of a clock.
Definition at line 14 of file PClockMockFile.h.
| PClockMockFile::PClockMockFile | ( | ) |
Default constructor of PClockMockFile.
Definition at line 43 of file PClockMockFile.cpp.
References initialisationPClockMockFile().
Here is the call graph for this function:
|
virtual |
Destructor of PClockMockFile.
Definition at line 48 of file PClockMockFile.cpp.
References close().
Here is the call graph for this function:| void PClockMockFile::close | ( | ) |
Close the PClockMockFile.
Definition at line 88 of file PClockMockFile.cpp.
References p_mock.
Referenced by phoenix_createClockMock(), and ~PClockMockFile().
Here is the caller graph for this function:
|
private |
Initialisation function of the class PClockMockFile.
Definition at line 93 of file PClockMockFile.cpp.
Referenced by PClockMockFile().
Here is the caller graph for this function:| time_t PClockMockFile::now | ( | ) |
Get the mocked current time.
Definition at line 55 of file PClockMockFile.cpp.
References p_mock.
| void PClockMockFile::setCurrentTime | ( | time_t | currentTime | ) |
Set the current time to be recorded.
| currentTime | : current time to be recorded |
Definition at line 72 of file PClockMockFile.cpp.
References p_mock.
| void PClockMockFile::setMockPrefix | ( | const std::string & | mockPrefix | ) |
Set the mock directory.
| mockDirectory | : mock directory |
Definition at line 81 of file PClockMockFile.cpp.
References p_mock.
Referenced by phoenix_createMockBackend().
Here is the caller graph for this function:| void PClockMockFile::sleep | ( | EllapsedTime | ellapsedTime | ) | const |
Sleep for the given ellapsed time.
| ellapsedTime | : time to sleep |
Definition at line 65 of file PClockMockFile.cpp.
|
private |
Mock handler.
Definition at line 31 of file PClockMockFile.h.
Referenced by close(), now(), setCurrentTime(), and setMockPrefix().