admin
2023-02-09 125db633619a0b4c7bd1d498ea2bf1cefa4f73d3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#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();
};