00001 /****************************************************************************** 00002 ** Copyright (c) 1992-2010 VT MAK 00003 ** All rights reserved. 00004 ******************************************************************************/ 00005 00009 00010 #ifndef lgrTimeInterface_H_ 00011 #define lgrTimeInterface_H_ 00012 00013 #include "lgrSystemInterface.h" 00014 00015 namespace MAKLogger 00016 { 00017 class DtLgrTimeCommandFactory; 00018 00021 class DT_DLL_LGRCORE DtLgrTimeInterface : public virtual DtLgrSystemInterface 00022 { 00023 public: 00024 typedef std::pair<DtAbsoluteTime,DtAbsoluteTime> TimePair; 00025 00026 //Used to shorten code. 00027 typedef DtLgrTimeCommandFactory Factory; 00028 00029 //Used to shorten code. 00030 typedef DtLgrTimeInterface ThisClass; 00031 00032 protected: 00033 00035 DtLgrTimeInterface(DtLogger& logger); 00036 00037 public: 00039 virtual ~DtLgrTimeInterface(); 00040 00042 virtual const DtAbsoluteTime& currentTime() const; 00043 00045 virtual const DtAbsoluteTime& startTime() const; 00046 00048 virtual const DtAbsoluteTime& stopTime() const; 00049 00051 virtual const DtAbsoluteTime& firstTime() const; 00052 00054 virtual const DtAbsoluteTime& lastTime() const; 00055 00057 virtual bool atStartTime() const; 00058 00060 virtual bool atStopTime() const; 00061 00063 void currentTimeChanged(DtResponse); 00065 void startStopTimesChanged(DtResponse); 00067 void firstLastTimesChanged(DtResponse); 00068 00070 DtValueSignal<DtAbsoluteTime> currentTimeChangedSignal; 00071 DtValueSignal<TimePair> startStopTimesChangedSignal; 00072 DtValueSignal<DtAbsoluteTime> firstTimeChangedSignal; 00073 DtValueSignal<DtAbsoluteTime> lastTimeChangedSignal; 00074 00075 protected: 00077 void connectResponse(DtLgrCommandId, 00078 void (DtLgrTimeInterface::*)(DtResponse)); 00079 00080 protected: 00081 DtAbsoluteTime myCurrentTime; 00082 DtAbsoluteTime myFirstTime; 00083 DtAbsoluteTime myLastTime; 00084 TimePair myStartStopTimes; 00085 }; 00086 } 00087 00088 #endif