Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Filezilla/src/include/     Datei vom 7.0.2015 mit Größe 628 B image not shown  

Impressum event_handler.h   Sprache: C

 

#ifndef FILEZILLA_ENGINE_EVENT_HANDLER
#define FILEZILLA_ENGINE_EVENT_HANDLER

class CEventBase;
class CEventLoop;

#include "event_loop.h"

class CEventHandler
{
public:
 CEventHandler(CEventLoop& loop);
 virtual ~CEventHandler();

 void RemoveHandler();

 virtual void operator()(CEventBase const&) = 0;

 template<typename T, typename... Args>
 void SendEvent(Args&&... args) {
  event_loop_.SendEvent(this, new T(std::forward<Args>(args)...));
 };

 timer_id AddTimer(int ms_interval, bool one_shot);
 void StopTimer(timer_id id);

 CEventLoop & event_loop_;

private:
 friend class CEventLoop;
 bool removing_{};
};

#endif

Messung
CHZG
829810093

¤ Dauer der Verarbeitung: 0.8 Sekunden  ¤

*© Formatika GbR, Deutschland