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++

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