#pragma once

#include "dll_macro.h"
#include "IComputer.h"
#include "Hardware.h"
class Sensor;
#include "Parameter.h"
struct innerVisitor;
class VisitorCallBacks;
typedef void (*VisitComputerDelegate)(IComputer& computer, Visitor* visitor);
typedef void (*VisitHardwareDelegate)(Hardware& hardware, Visitor* visitor);
typedef void (*VisitSensorDelegate)(Sensor& sensor, Visitor* visitor);
typedef void (*VisitParameterDelegate)(Parameter& parameter, Visitor* visitor);
class DLL_API Visitor {
public:
    Visitor();

    void setVisitComputerCallBack(VisitComputerDelegate);
    void setVisitHardwareCallBack(VisitHardwareDelegate);
    void setVisitSensorCallBack(VisitSensorDelegate);
    void setVisitParameterCallBack(VisitParameterDelegate);

    void commit();
    VisitComputerDelegate getVisitComputerCallBack();
    VisitHardwareDelegate getVisitHardwareCallBack();
    VisitSensorDelegate getVisitSensorCallBack();
    VisitParameterDelegate getVisitParameterCallBack();
    innerVisitor* getInner();
protected:
    innerVisitor* inner;
    VisitComputerDelegate visitComputerCallBack;
    VisitHardwareDelegate visitHardwareCallBack;
    VisitSensorDelegate visitSensorCallBack;
    VisitParameterDelegate visitParameterCallBack;
    
};
