g_array.h

来自「c语言是面向过程的程序语言」· C头文件 代码 · 共 56 行

H
56
字号
#if defined(GENERIC) || !defined(G_ARRAY_H)#define G_ARRAY_H/* ****************************** * Object Oriented Programming in C * * Author: Laurent Deniau, Laurent.Deniau@cern.ch * * For more information, please see the paper: * http://home.cern.ch/ldeniau/html/oopc/oopc.html * ****************************** */#include <g_memBlock.h>/*-----------------------------*//*   Generic array interface   *//*    inherit from memBlock    *//*-----------------------------*/#undef  OBJECT#define OBJECT GENERIC(array)/* Object interface */OBJECT_INTERFACE  INHERIT_MEMBERS_OF(GENERIC(memBlock));  gType1* private(data);OBJECT_METHODS  INHERIT_METHODS_OF(GENERIC(memBlock));  gType1* method(getData);  void method_(startAt) int i __;  void method_(set) size_t i, gType1 x __;  gType1 constMethod_(get) size_t i __;ENDOF_INTERFACE/* Class interface */CLASS_INTERFACE  t_OBJECT*const classMethod_(new) size_t n __;  t_OBJECT*const classMethod_(newRef) gType1 *const t __;  void method_(init) size_t n __;  void method_(initRef) gType1 *const t __;ENDOF_INTERFACE#endif

⌨️ 快捷键说明

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