Feature #586
Test implemention of eventLoop class
Beginn:
27.11.2024
Abgabedatum:
% erledigt:
0%
Geschätzter Aufwand:
CS Zielversion:
Beschreibung
Would be nice to have an automated way for eventLoop handling.
class CEventLoop
{
private:
static CEventLoop* m_first;
CEventLoop* m_next=nullptr;
public:
CEventLoop()
{
if(!m_first)
{
m_first=this;
}
else
{
CEventLoop* p=m_first;
while( p->m_next)
{
p=p->m_next;
}
p->m_next=this;
}
}
virtual void eventLoop()
{
printf("L %p\n", this);
}
static void allEventLoops()
{
CEventLoop* p=m_first;
while(p)
{
p->eventLoop();
p=p->m_next;
}
}
};
CEventLoop* CEventLoop::m_first = nullptr;
The (RAM) size on an AMD64 is 16 Bytes having 2 pointers. On ARM it will be 8 Bytes.