You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
whellvalue/tpvs17/tpMain/CoreCtrl/CDllDetectorEngine.cpp

34 lines
633 B
C++

5 years ago
#include "CDllDetectorEngine.h"
#include "DllLoader.h"
5 years ago
CDllDetectorEngine::CDllDetectorEngine()
{
m_pLibEngineCtrl = new CDllLoaderM("lpbengine", "Lib_Engine_Init", "Lib_Engine_Free", QStringList());
if (m_pLibEngineCtrl != nullptr)
5 years ago
{
m_pDE = (IDetectorEngine*)m_pLibEngineCtrl->ModuleInit(nullptr);
if (m_pDE){
m_pDE->Initialize();
}
else {
qWarning("failed to get instance from lpbengine");
}
5 years ago
}
}
CDllDetectorEngine::~CDllDetectorEngine()
{
if (nullptr != m_pDE)
5 years ago
{
delete m_pDE;
m_pDE = nullptr;
}
if (nullptr != m_pLibEngineCtrl)
{
delete m_pLibEngineCtrl;
m_pLibEngineCtrl = nullptr;
5 years ago
}
}