initial commit

This commit is contained in:
Blue 2018-08-05 00:46:25 +03:00 committed by Юрий Губич
commit 4b60ece582
327 changed files with 28286 additions and 0 deletions

View file

@ -0,0 +1,48 @@
#ifndef DISPATCHER_H
#define DISPATCHER_H
#include <map>
#include <list>
#include <wType/string.h>
#include <wType/address.h>
#include <wType/event.h>
#include <QtCore/QObject>
#include "handler.h"
#include "defaulthandler.h"
#include <wContainer/order.h>
namespace W
{
class Dispatcher:
public QObject
{
Q_OBJECT
public:
Dispatcher();
~Dispatcher();
void registerHandler(W::Handler* dp);
void unregisterHandler(W::Handler* dp);
void registerDefaultHandler(W::DefaultHandler* dh);
void unregisterDefaultHandler(W::DefaultHandler* dh);
public slots:
void pass(const W::Event& ev) const;
protected:
typedef std::map<W::Address, W::Order<W::Handler*>> n_map;
typedef W::Order<W::DefaultHandler*> d_order;
n_map nodes;
d_order defaultHandlers;
};
}
#endif // DISPATCHER_H