Aktionen
Event loop chain¶
#include <stdlib.h>
#include <stdint.h>
#include <stdio.h>
#include "/home/deseessm/wp/src/canswitch/liblepto/include/lepto/signal.h"
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;
Von Maximilian Seesslen vor etwa 11 Stunden aktualisiert · 1 Revisionen