openmohaa/code/qcommon/con_timer.h

36 lines
759 B
C
Raw Normal View History

2023-01-29 20:59:31 +01:00
#include "class.h"
class con_timer : public Class
{
public:
2023-08-19 03:02:30 +02:00
class Element
{
public:
Class *obj;
int inttime;
};
2023-01-29 20:59:31 +01:00
private:
2023-08-19 03:02:30 +02:00
Container<con_timer::Element> m_Elements;
bool m_bDirty;
int m_inttime;
2023-01-29 20:59:31 +01:00
public:
2023-08-19 03:02:30 +02:00
con_timer();
2023-01-29 20:59:31 +01:00
2023-08-19 03:02:30 +02:00
void AddElement(Class *e, int inttime);
void RemoveElement(Class *e);
2023-01-29 20:59:31 +01:00
2023-08-19 03:02:30 +02:00
Class *GetNextElement(int& foundTime);
2023-01-29 20:59:31 +01:00
2023-08-19 03:02:30 +02:00
void SetDirty(void) { m_bDirty = true; };
2023-01-29 20:59:31 +01:00
2023-08-19 03:02:30 +02:00
bool IsDirty(void) { return m_bDirty; };
void SetTime(int inttime) { m_inttime = inttime; };
#if defined(ARCHIVE_SUPPORTED)
static void ArchiveElement(class Archiver& arc, Element *e);
void Archive(class Archiver &arc) override;
2023-01-29 20:59:31 +01:00
#endif
};