57 lines
1.2 KiB
C++
57 lines
1.2 KiB
C++
/*********************************************************************
|
|
*
|
|
* 文 件: AlgorithmThread.h
|
|
*
|
|
* 版权所有: Shanghai Baosight Software Co., Ltd.
|
|
*
|
|
*
|
|
*********************************************************************/
|
|
|
|
#ifndef H_ALGORITHM_THREAD_H
|
|
#define H_ALGORITHM_THREAD_H
|
|
|
|
#include <IceUtil/Thread.h>
|
|
#include <eqpalg/AlgorithmBase.h>
|
|
#include <glob/ProxyMag.h>
|
|
#include <map>
|
|
#include <zlib/MemTable.hpp>
|
|
|
|
using namespace std;
|
|
using namespace baosight;
|
|
using namespace IceUtil;
|
|
|
|
/*********************************************************************
|
|
* 类 名: AlgorithmThread
|
|
* 版权所有: Shanghai Baosight Software Co., Ltd.
|
|
*
|
|
*********************************************************************/
|
|
|
|
class AlgorithmThread : public Thread {
|
|
public:
|
|
AlgorithmThread(const string &algname);
|
|
virtual ~AlgorithmThread();
|
|
|
|
public:
|
|
void run();
|
|
void cancel();
|
|
|
|
int Attach(AlgorithmBase *, bool usable = true);
|
|
|
|
int Detach(const string &ruleid);
|
|
|
|
int SetUsable(const string &ruleid, bool usable);
|
|
|
|
int size();
|
|
|
|
private:
|
|
bool m_isrun;
|
|
int nRet;
|
|
string m_log;
|
|
// ruleId to ALg Poiner
|
|
std::map<string, AlgorithmBase *> mp_rules;
|
|
|
|
private:
|
|
MessageICEPrx mqp_proxy;
|
|
};
|
|
#endif
|