📄 cb.h,v
字号:
head 1.3;access;symbols;locks; strict;comment @ * @;1.3date 96.12.05.16.56.38; author ganapath; state Exp;branches;next 1.2;1.2date 96.12.04.22.59.19; author ganapath; state Exp;branches;next 1.1;1.1date 96.11.05.12.18.40; author picone; state Exp;branches;next ;desc@initial version.@1.3log@removed stdio.h from include files.@text@// file: cb.h//// this file defines a circular buffer class//// make sure definitions are only made once//#ifndef __CB#define __CBclass Circular_buffer { //--------------------------------------------------------------------------- // // protected data // //---------------------------------------------------------------------------protected: // data information // int idx_d; int size_d; float *buf_d; //--------------------------------------------------------------------------- // // public methods // //---------------------------------------------------------------------------public: // constructors/destructors // Circular_buffer(); ~Circular_buffer(); // allocation // void allocate_cc(int num_elements); // indexing methods // int add_cc(float new_value); // overloaded operators // float operator() (int index); operator float() {return (float)buf_d[idx_d];} float& operator= (float value) { add_cc(value); return buf_d[idx_d]; } //--------------------------------------------------------------------------- // // private methods // //---------------------------------------------------------------------------private: // none};//// end of include file#endif@1.2log@ included stdio.h@text@a5 4// system include files//#include <stdio.h>@1.1log@Initial revision@text@d6 4@
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -