eis/inc/eqpalg/AlgorithmThread.h

57 lines
1.2 KiB
C
Raw Permalink Normal View History

/*********************************************************************
*
* : 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