#pragma once
|
#include <string>
|
#include <iostream>
|
#include <list>
|
#include "ImgUtil.h"
|
#include "RecognitionManager.h"
|
#include "THSActionUtil.h"
|
//ÏÖ¼Û
|
struct CurrentPriceData
|
{
|
string code;
|
string price;
|
string volumn;
|
MoneyUnit volumnUnit;
|
//¸¨Öú¹¦ÄÜ
|
int index;
|
};
|
|
//ÕÇÍ£»ñÈ¡
|
typedef void (*CallbackFun_Current_Price)(list<CurrentPriceData> codeList, void* contex);
|
|
|
class CurrentPriceCapture
|
{
|
private:
|
static bool tradeTimeCapture;
|
static OpenCLExcuter* openCLExcuter;
|
static RecognitionManager* recognitionManager;
|
static bool inited;
|
//ÊÇ·ñÕýÔÚÖ´ÐÐ
|
static bool running;
|
|
static bool kill;
|
|
static CallbackFun_Current_Price data_callback;
|
|
static void* context;
|
|
static void _run();
|
|
static HWND win;
|
|
static HWND menuWin;
|
|
static std::list<cv::Point> pointList;
|
|
|
public:
|
static void setTradeTimeCapture(bool enable) {
|
tradeTimeCapture = enable;
|
}
|
|
void init(CallbackFun_Current_Price callback, void* context);
|
|
//ÖØÐ´´½¨ÔËÐÐÏß³Ì
|
void reCreateRunning();
|
|
void refreshHWND();
|
|
bool isRunning();
|
|
static list<CurrentPriceData> capture(cv::Mat img, OpenCLExcuter* openCLExcuter);
|
|
static list<CurrentPriceData> capture();
|
|
//È«²¿¿ªÊ¼
|
void start();
|
//È«²¿½áÊø
|
void stop();
|
bool isInited();
|
};
|