LW_OOPC.H 面向对象C MISOO 头文件
来源:互联网 发布:王克勤记者知乎 编辑:程序博客网 时间:2024/06/04 19:35
Use Case(用例)的主要内涵及其表达为:
1)描述该服务的名称及返回的信息类型,她描述What
2)描述服务过程中,用户与系统之间有哪些交互,其描述How和When。但是请留意,这个How不是员工作汉堡的How,而是用户与系统如何交互的How。
3)描述用户的角色,她描述Who
/////////////////////////////////////////////////////////////////////////////////////
动态型(Dynamic):使用malloc函数
静态型(Static):标准型;不用malloc,其对象不是在程序执行期间才去分配空间的。而是与一般的int,char形态的变量一样,在编译期间就留下内存空间了,不需要在执行期间通过malloc来取得内存空间。
纯粹静态型(pure STATIC)精简型;避免使用指针来调用函数。即不调用new函数。
/* lw_oopc_kc.h */ #ifndef LOOPC_H #define LOOPC_H #include <malloc.h> #define CLASS(type)/ typedef struct type type; / struct type#ifndef LW_OOPC_PURE_STATIC #ifndef LW_OOPC_STATIC #ifndef LW_OOPC_DYNAMIC#define CTOR(type) / void* type##Setting(type*); / void* type##New() / { / struct type *t; / t = (struct type *)malloc(sizeof(struct type)); / return type##Setting(t); / } / void* type##Setting(type *t) / { #else #define CTOR(type) / void* type##New() / { / struct type* t; / t = (struct type*)malloc(sizeof(struct type)); #endif #else #define CTOR(type) / void * type##Setting(type* t)/ { #endif #endif#define END_CTOR return (void*)t; } #define FUNCTION_SETTING(f1, f2) t->f1 = f2; #define IMPLEMENTS(type) type type #define INTERFACE(type) / typedef struct type type; / struct type #endif /* end */
0 0
- LW_OOPC.H 面向对象C MISOO 头文件
- {C语言}之 轻量级的面向对象 C编程 框架 LW_OOPC
- stdio.h c头文件
- C标准库头文件 assert.h
- C语言头文件之float.h
- c语言头文件time.h
- c语言 conio.h头文件介绍
- C语言 头文件(.h)使用方法
- c头文件(.h)的作用
- 关于C头文件包含include "**.h"
- C中.h头文件的写法
- C语言string.h头文件函数
- C语言头文件之ctype.h
- C中.h头文件的写法
- C++Primer 中的Sales_items.h头文件
- linux C中 头文件 fcntl.h
- C 头文件之<ctpye.h>
- c语言 conio.h头文件介绍
- [网络子系统] linux-2.6.35.6 nf_conntrack
- Java Web项目开发需要掌握的技术
- 表空间学习笔记(二)
- ios ViewController 页面跳转
- Page 41, 自立题四
- LW_OOPC.H 面向对象C MISOO 头文件
- 二见钟情之组合查询(vb.net版)
- UIPro 实例讲解一 商业级手机快速检测平台
- IOS中如何限制TextField中输入的类型以及长度
- Windows Server 2003 安装程序无法复制文件 scrdenrl.dl_
- php ltrim() rtrim() trim()删除字符空格
- 2013.12.15
- sql语句之join
- VC 设置开机自动运行