⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 qf.h

📁 这是状态机的一个框架结构的例子,可以作为状态机的基本架构
💻 H
字号:
/******************************************************************** 
 * Quantum Framework OS-independent declaration ("C+" version)
 * Copyright (c) 2002 Miro Samek, Palo Alto, CA.
 * All Rights Reserved.
 *******************************************************************/
#ifndef qf_h
#define qf_h

         /* densly packet 32-bit "list" of subscriber active objects,
          * allocating 4-bits per active object-id allows to store 
          * up to 8 subscribers in this "list"
          */ 
typedef unsigned long QSubscrList;

/* class QF */
/* public methods */
void QFinit(QSubscrList subscr[], unsigned maxSignal);
void QFcleanup();
void QFpoolInit(QEvent *poolSto, 
                unsigned nEvts, unsigned evtSize);
void QFtick();
char const *QFgetVersion(); 
QEvent *QFcreate(unsigned evtSize, QSignal sig);
#define Q_NEW(evtT_, sig_) \
       ((evtT_ *)QFcreate(sizeof(evtT_), (sig_)))
void QFsubscribe(QActive *a, QSignal sig);
void QFunsubscribe(QActive *a, QSignal sig);
void QFpublish(QEvent *e);                        /* publish event */

void QFbackground();     /* for foreground/background systems only */

/* private methods (internal interface for QActive only) */
void QFosInit__();
void QFosCleanup__();
void QFadd__(QActive *a);
void QFremove__(QActive *a);
void QFpropagate__(QEvent *e);     /* propagate to next subsrciber */
void QFannihilate__(QEvent *e);

#endif                                                     /* qf_h */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -