📄 qactive.h
字号:
/////////////////////////////////////////////////////////////////////
// Quantum Active Object declaration (C++ version)
// Copyright (c) 2002 Miro Samek, Palo Alto, CA.
// All Rights Reserved.
/////////////////////////////////////////////////////////////////////
#ifndef qactive_h
#define qactive_h
#ifndef qhsm_h
#include "qhsm.h"
#endif
class QActive : public QHsm { // Quantum Active Object base class
public:
int start(unsigned prio, QEvent *qSto[], unsigned qLen,
int stkSto[], unsigned stkLen);
void postFIFO(QEvent *e); // post event directly (FIFO enqueuing)
void postLIFO(QEvent *e); // post event directly (LIFO enqueuing)
void run(); // run() is active throughout lifetime of the object
protected:
QActive(QPseudoState initial); // protected ctor
virtual ~QActive(); // virtual xtor
void stop(); // stopps the thread; nothing happens thereafter!
private:
int enqueue(QEvent *e); // intended to use only by friend class QF
private: // data members...
QF_EQUEUE(myEqueue) // OS-dependent event-queue primitive
QF_THREAD(myThread) // OS-dependent thread primitive
unsigned char myPrio; // priority of the active object
friend class QF;
};
#endif // qactive_h
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -