design by contract?
2004-11-19 10:44
603 查看
as for a class's private member, how to design the contract? it is true that the caller of a private member of a class must be
one or several of the class's member. so perhaps the contract for the outer parameters( arguments, object's data member and global variable) should like this:
1. the caller knows more about the arguments passed to the private member, so it should verify it and the private member should assert it.
2. for data member, it's rather complex
3. for global variable, to the methord called, is just like its parameters
one or several of the class's member. so perhaps the contract for the outer parameters( arguments, object's data member and global variable) should like this:
1. the caller knows more about the arguments passed to the private member, so it should verify it and the private member should assert it.
2. for data member, it's rather complex
3. for global variable, to the methord called, is just like its parameters
相关文章推荐
- ATL实现Connection Point的一种简单的方法
- 一个非常不错的业务规则管理器
- DirectX.Capture
- 使用C#开发COM+组件
- Java的中文编程与配置心得
- 看到一篇好文章与大家分享!!!!!
- 纯编码实现数据库的建立或压缩
- 从数据库中动态选取下拉列表的方法
- 用ASP备份数据库
- thinking in c++ 卷2
- thinking in c++卷2
- thinkng in c++卷2
- 初学者的问题----csdn系列
- Phrack最新公布的内核态RootKit的技术细节(e文)
- Manage Control Flow in Struts Apps
- How to build a struts application
- VB.NET学习资料:
- log4j使用示例
- Red Hat Linux 7.2汉化
- 2014年软考数据库系统工程师知识点讲解(1)