PhoenixClockMock  2.0.0
Tool to manipulate mock of clock (split, merge and get info)
PGenericClock.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 __PGENERICCLOCK_H__
8 #define __PGENERICCLOCK_H__
9 
10 #include "PClockMode.h"
11 #include "PClockBackend.h"
12 #include "PClockNsBackend.h"
13 #include "PClockMock.h"
14 
16 template<typename _TBackend, typename _TMockBackend>
18  public:
19  PGenericClock();
21  virtual ~PGenericClock();
23 
26 
27  time_t now();
28 
29  protected:
31  private:
33 
37  _TBackend p_clockBackend;
39  _TMockBackend p_mockBackend;
40 };
41 
42 #include "PGenericClock_impl.h"
43 
44 
45 #endif
46 
Generic clock which can use several backends (real clock backend and a mock of clock)
Definition: PGenericClock.h:17
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.
_TBackend p_clockBackend
Instance of the clock backend (necessary for some clock backends)
Definition: PGenericClock.h:37
_TMockBackend p_mockBackend
Instance of the clock backend (necessary for some clock backends)
Definition: PGenericClock.h:39
PClockMode::PClockMode p_mode
Mode of the Clock (no mock, mock, mock_record)
Definition: PGenericClock.h:35
PClockMode
describe the mode of the Socket
Definition: PClockMode.h:12