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.
45 lines
1.7 KiB
C++
45 lines
1.7 KiB
C++
#include "iImgProc.h"
|
|
#include "QZkMutexMap.h"
|
|
#include "baseClass.h"
|
|
#include <QtCore/QAtomicInt>
|
|
#include <QtCore/QReadWriteLock>
|
|
#include "LoadAlgorithm.h"
|
|
|
|
class CImgProc : public IImgProc
|
|
{
|
|
public:
|
|
CImgProc(IMGPROC_IN_PARAM* pParam);
|
|
virtual ~CImgProc(void);
|
|
|
|
int InitProc();
|
|
void FreeProc();
|
|
private:
|
|
virtual int IImageProcess(class IImageObject* pImgObj, class IDetectorEngine* pDE = NULL);
|
|
virtual class IAlgorithmOption* IGetAlgorithmOption(int nAlgorithm);
|
|
private:
|
|
//static CAlgorithmOption* createAlgorithmOption(const int& k, void* pData);
|
|
static void releaseAlgorithm(const Qt::HANDLE& k, class IAlgorithm*& v, void* pData);
|
|
// static void releaseAlgorithmOption(const int& k, CAlgorithmOption*& v, void* pData);
|
|
//class IImageProc* m_pImgProc;
|
|
public:
|
|
static TP_GLOBAL_DATA* s_pGlobalData;
|
|
const static char cs_strCfgName[];
|
|
private:
|
|
bool m_bIsInited;
|
|
//QSqliteAlgorithm m_dbAlg;
|
|
//QZkMutexMap<Qt::HANDLE, class IAlgorithm*> m_algorithms;
|
|
QAtomicInt m_nAlgorithmsUsings;
|
|
// QZkMutexMap<int, CAlgorithmOption*> m_algorithmOptions;
|
|
//class CLoadAlgorithm* m_pLibAlgorithm;
|
|
QZkMutexMap<QString, CLoadAlgorithm*> m_algorithmDlls;
|
|
CLoadAlgorithm* m_pDefAlgorithmDll;//nAlgorithm = 0; tpAlgorithm.dll
|
|
struct tagALGORITHM_API{
|
|
class IAlgorithm* pApi;
|
|
class CLoadAlgorithm* pDll;
|
|
};
|
|
QZkMutexMap<Qt::HANDLE, QMap<QString, tagALGORITHM_API*>> m_threadAlgorithms;
|
|
static CLoadAlgorithm* createAlgorithmDll(const QString& k, void* pData);
|
|
static void releaseAlgorithmApis(QMap<QString, tagALGORITHM_API*>& v, void* pData);
|
|
static void releaseAlgorithmDlls(CLoadAlgorithm*& v, void* pData);
|
|
};
|