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

📄 queue.h

📁 在Linux底下用QtDesigner开发的一个进程同步例子。基本思想是设计一个缓冲区(循环队列)
💻 H
字号:
#include <qglobal.h>struct Circle{    int InitX;    int InitY;    int InitR;};class HQueue{                              //define classes of Cycle Queuepublic:   HQueue(int = 4);   ~HQueue(){delete []Q;}   void EnQueue(Circle& item);   Circle DeQueue();   Circle GetFront();   void MakeEmpty(){front = rear = 0;}//tag =0;}                    //get Queue empty       int IsEmpty() const {return front == rear ;}//&& tag == 0; }   //if Queue is empty       int IsFull() const {return front == (rear+1)%m;}//&&tag ==1;    //if Queue is fullprivate:      // public:   int rear;                                                  //the signal of Queue tail   int front;                                                 //the signal of Queue head    //int tag;                                                   //the signal of if Queue is full   Circle *Q;                                                   //a array which store Queue elements   int m;                                                     //the max size of Queue};

⌨️ 快捷键说明

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