34 lines
611 B
C++
34 lines
611 B
C++
|
|
#pragma once
|
|
#include <pthread.h>
|
|
#include <unistd.h>
|
|
#include <deque>
|
|
#include <iostream>
|
|
#include <vector>
|
|
#include <errno.h>
|
|
#include <string.h>
|
|
|
|
#include "Global.h"
|
|
#include "nuanceocr.h"
|
|
#include "OCRArg.h"
|
|
|
|
namespace sequencelogic
|
|
{
|
|
|
|
//template<class TClass>
|
|
class Task
|
|
{
|
|
public:
|
|
Task(CNuanceOCR* objPtr, OCRArg* arg); // pass an object method pointer
|
|
Task(void (*fn_ptr)(void*), void* arg); // pass a free function pointer
|
|
~Task();
|
|
void operator()();
|
|
void run();
|
|
void printMsg(std::string msg);
|
|
private:
|
|
CNuanceOCR* pOCR;
|
|
OCRArg* pArg;
|
|
void(*m_fn_ptr)(void*);
|
|
void* m_arg;
|
|
};
|
|
} |