/******************************************************************************
Online C++ Compiler.
Code, Compile, Run and Debug C++ program online.
Write your code in this editor and press "Run" button to compile and execute it.
*******************************************************************************/
#include <iostream>
class camerafunction
{
protected:
int systemEventHandler=0;
public:
void detectcam()
{
std::cout << "detectcam"<< std::endl;
};
};
class MFCGUI : public camerafunction
{
public:
void startdeviceevent()
{
systemEventHandler = 42;
std::cout << "startdeviceevent with systemEventHandler=" << systemEventHandler << std::endl;
}
};
class SystemEventHandlerImpl
{
public:
void onDeviceArrival()
{
MFCGUI obj;
obj.startdeviceevent();
obj.detectcam();
}
};
int main()
{
SystemEventHandlerImpl obj;
obj.onDeviceArrival();
return 0;
}