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

📄 ledbuffer.hpp

📁 是一个键盘测试程序
💻 HPP
字号:
#ifndef _LEDBUFFER_H__#define _LEDBUFFER_H__#include "ledtype.h"#ifdef __cplusplusextern "C" {#endifclass LedBuffer {public:	LedBuffer() {		m_count = 0;			m_used = 0;		m_data = NULL; 	}	virtual ~LedBuffer();	void setSize(int capacity);	int getSize();	BOOL isEmpty();	BOOL isFull();	int getMaxIndex();	/*	@return the newly appended string's id	*/	size_t GB2312ToUCS2(char* out_buf, size_t buf_len,					            const char* in_str);	size_t ToUCS2(char* out_buf, size_t buf_len,					const char* in_str,					const char* in_code);	int AppendUCS2(const unsigned short* str);	//int add(const char* str);	BOOL rm_byIndex(int idx);	/*	@return 0 , no item removed;	@return >0 , the count of items removed;	*/ 	int  rm_byDate(time_t timebegin,time_t timeend);	BOOL replaceUCS2(int idx,const unsigned short* str);	//BOOL replace(int idx, const char* str);	/*	  @ 0 return ok	  @ >0 output buffer too small, the minBuffersize;	  */	int textUCS2(unsigned short* buf,int size);	BOOL setDate(int idx, time_t date);	void clear();	int find_bycontentUCS2(const unsigned short* str);	int getcontentUCS2_byIndex(int idx,unsigned short* buf,int size);private:	int m_count;	int m_used;	void* m_data;};#ifdef __cplusplus}#endif#endif

⌨️ 快捷键说明

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