📄 serialthread.hpp
字号:
/********************************************************************
file base: serialThread
file ext: hpp
*********************************************************************/
#ifndef SERIALTHREAD_HPP
#define SERIALTHREAD_HPP
// class SerialThread
//-----------------------------------------------------------------------------
// Description: This class is inherited from CWinThread, use to handle in part
// of thread process (muliti tasking).
//
class CSerialAppDlg; // Forward Declaration.
class SerialCtl;
class SerialDoc;
class SerialThread : public CWinThread
{
public:
// To enable objects of CObject-derived classes to be created dynamically at
// run timeto enable objects of CObject-derived classes to be created
// dynamically at run time
//DECLARE_DYNCREATE(SerialThread)
DECLARE_SERIAL(SerialThread)
SerialThread (); // Constructor.
virtual ~SerialThread(); // Destructor.
public:
virtual BOOL InitInstance(); // virtual function that derive from base-class.
virtual int Run(); // virtual function that derive from base-class.
void setOwner(CSerialAppDlg* ptrDialog)
{ptrDlg = ptrDialog;} // Assign the pointer to pointerDlg is as agent
// of Class CSerialAppDlg.
private:
CSerialAppDlg* ptrDlg; // The pointer that pointer to object CSerialAppDlg.
};
// class SCC
//-----------------------------------------------------------------------------
// Description: This class is as the interface that is used to access the object of Class SerialCtl.
//
class SCC
{
public:
SCC() {}; // Constructor.
~SCC() {}; // Destructor.
public:
static SerialCtl &serialCtl() // Implement as the singleton funciton.
{
static SerialCtl serial;
return serial;
}
};
#endif //SERIALTHREAD_HPP
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -