You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
711 B

#ifndef CSCI_CONTROLLER_HANDLER_H
#define CSCI_CONTROLLER_HANDLER_H
#include <functional>
#include <QString>
#include <memory>
#include <QMap>
#ifndef _MSC_VER
#include <cxxabi.h>
#endif
#include "kafka_handler.h"
#include "../include/controller/controller.h"
using ControllerFunc = std::function<Controller *()>;
using ControllerFuncMap = QMap<QByteArray, ControllerFunc>;
class ControllerHandler: public QObject {
Q_OBJECT
private:
static ControllerFuncMap &getControllerFuncMap();
public:
static void init();
static QString getClassname(const char *mangled_name);
static void registerCtl(const QString &key, const ControllerFunc &fun);
};
#endif //CSCI_CONTROLLER_HANDLER_H