#pragma once
#include "../include/Define.h"
#include <QtCore/QLibrary>
#include <string>

class DataConsumer
{
public:
    virtual void OnData(std::string name,QVariant val) = 0;
};

class BaseModule
{
private:
    QLibrary*       m_pLibrary;

public:
    virtual ~BaseModule(){}
    virtual void setLoader(QLibrary* pLibrary){m_pLibrary = pLibrary;};

    virtual void Setup(ModuleInfo mi) = 0;
    virtual void regConsumer(DataConsumer* pDC) = 0;
    virtual bool isInheritedFrom(std::string tp) = 0;
    virtual void OnSubData(std::string name,std::string val) = 0;
};
