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

📄 oamtask.h

📁 对POSIX timer的面向对象的封装。
💻 H
字号:
#ifndef OAMTASK_H_#define OAMTASK_H_#include "oamRunner.h"class CommonData{public:  CommonData();  CommonData(char * rawData , int length);  virtual ~CommonData();  int getLength() const;  void setLength(int length);  char * getData() const;  void setData(char * rawData);private:  // the length of the raw data  int length_m;  // the pointer of the raw data  char * rawData_m;  };class OamTask:public OamRunner{public:  OamTask();  virtual ~OamTask();  int initialize();  int putq(CommonData & commonData);  int getq(CommonData & commonData);protected:  // the logic handler which is implemented by the derived-class  virtual int handle(CommonData * pData);private:  // the definition pf the pipe type.  enum  {    FD_READ = 0,    FD_WRITE,    FD_MAX  };  // the thread method.  virtual int run();  // the FD of the queue.  int queue_m[FD_MAX];};#endif

⌨️ 快捷键说明

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