27 #ifndef ICB_EVENTTIMER_H_INCLUDED 28 #define ICB_EVENTTIMER_H_INCLUDED 30 #include "common/stream.h" 32 #include "engines/icb/string_vest.h" 33 #include "engines/icb/common/px_string.h" 34 #include "engines/icb/event_list.h" 54 void SetObjectID(int32 nObjectID) { m_nObjectID = nObjectID; }
55 void SetStart(uint32 nStart) { m_nStart = nStart; }
56 void SetEnd(uint32 nEnd) { m_nEnd = nEnd; }
57 void SetInterval(uint32 nInterval) { m_nInterval = nInterval; }
58 void SetEventTime(uint32 nTime) { m_nCurrentTime = nTime; }
59 inline void SetEventName(
const char *pcEventName);
61 int32 GetObjectID()
const {
return (m_nObjectID); }
62 uint32 GetStart()
const {
return (m_nStart); }
63 uint32 GetEnd()
const {
return (m_nEnd); }
64 uint32 GetInterval()
const {
return (m_nInterval); }
65 uint32 GetEventTime()
const {
return (m_nCurrentTime); }
66 const char *GetEventName()
const {
return (m_pcEventName); }
74 stream->
write(m_pcEventName, MAXLEN_EVENT_NAME);
82 stream->
read(m_pcEventName, MAXLEN_EVENT_NAME);
90 uint32 m_nCurrentTime;
91 char m_pcEventName[MAXLEN_EVENT_NAME];
94 inline _event_timer::_event_timer() {
95 m_nObjectID = EVENT_INVALID_SENDER_ID;
100 m_pcEventName[0] =
'\0';
103 inline _event_timer::_event_timer(
const _event_timer &oX) {
104 m_nObjectID = oX.m_nObjectID;
105 m_nStart = oX.m_nStart;
107 m_nInterval = oX.m_nInterval;
108 m_nCurrentTime = oX.m_nCurrentTime;
113 m_nObjectID = oOpB.m_nObjectID;
114 m_nStart = oOpB.m_nStart;
115 m_nEnd = oOpB.m_nEnd;
116 m_nInterval = oOpB.m_nInterval;
117 m_nCurrentTime = oOpB.m_nCurrentTime;
123 inline void _event_timer::SetEventName(
const char *pcEventName) {
124 if (strlen(pcEventName) >= MAXLEN_EVENT_NAME)
125 Fatal_error(
"Event name [%s] too long (max %d) in _event_timer::SetEventName()", pcEventName, MAXLEN_EVENT_NAME - 1);
132 #endif // #if !defined( EVENTTIMER_H_INCLUDED ) void writeUint32LE(uint32 value)
Definition: stream.h:159
FORCEINLINE int32 readSint32LE()
Definition: stream.h:555
uint32 readUint32LE()
Definition: stream.h:473
void strcpy_s(char *dst, size_t size, const char *src)
FORCEINLINE void writeSint32LE(int32 value)
Definition: stream.h:200
virtual uint32 write(const void *dataPtr, uint32 dataSize)=0
Definition: event_timer.h:41
virtual uint32 read(void *dataPtr, uint32 dataSize)=0