oamtask.h
来自「对POSIX timer的面向对象的封装。」· C头文件 代码 · 共 66 行
H
66 行
#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 + =
减小字号Ctrl + -
显示快捷键?