7 #ifndef __PGENERICCLOCK_H_IMPL__
8 #define __PGENERICCLOCK_H_IMPL__
15 template<
typename _TBackend,
typename _TMockBackend>
17 initialisationPGenericClock();
23 template<
typename _TBackend,
typename _TMockBackend>
25 copyPGenericClock(other);
29 template<
typename _TBackend,
typename _TMockBackend>
38 template<
typename _TBackend,
typename _TMockBackend>
40 copyPGenericClock(other);
47 template<
typename _TBackend,
typename _TMockBackend>
55 template<
typename _TBackend,
typename _TMockBackend>
63 template<
typename _TBackend,
typename _TMockBackend>
66 return p_clockBackend.now();
68 return p_mockBackend.now();
70 time_t currentTime = p_clockBackend.now();
71 p_mockBackend.setCurrentTime(currentTime);
79 template<
typename _TBackend,
typename _TMockBackend>
85 template<
typename _TBackend,
typename _TMockBackend>
Generic clock which can use several backends (real clock backend and a mock of clock)
void copyPGenericClock(const PGenericClock< _TBackend, _TMockBackend > &other)
Copy function of PGenericClock.
PGenericClock()
Default constructor of PGenericClock.
PClockMode::PClockMode getMode() const
Get the mode of the PGenericClock (NO_MOCK, MOCK or MOCK_RECORD)
void setMode(PClockMode::PClockMode mode)
Set the mode of the PGenericClock (NO_MOCK, MOCK or MOCK_RECORD)
virtual ~PGenericClock()
Destructor of PGenericClock.
PGenericClock & operator=(const PGenericClock< _TBackend, _TMockBackend > &other)
Definition of equal operator of PGenericClock.
time_t now()
Get the current time of the clock.
void initialisationPGenericClock()
Initialisation function of the class PGenericClock.
PClockMode::PClockMode p_mode
Mode of the Clock (no mock, mock, mock_record)
PClockMode
describe the mode of the Socket