The Relationships Between Classes in Symbian OS C++ for Mobile Phones Volume 3
来源:互联网 发布:广州数据恢复公司哪家好 编辑:程序博客网 时间:2024/06/06 03:06
As you’d expect, classes are used to represent objects, abstractions and interfaces. Relationships between classes are used to represent relationships between objects or abstractions. The most important relationships between classes are:
• uses-a: if class A ‘uses-a’ class B, then A has a member of type B, B&, const B&, B* or const B*, or a function that can easily return a B in one of these guises; A can then use B’s member functions and data.
• has-a: ‘has-a’ is like ‘uses-a’, except that A takes responsibility for constructing and destroying the B as well as using it during its lifetime
• is-a: ifclass A ‘is-a’ class B, then B should be an abstraction of A; ‘is-a’ relationships are usually represented in C++ using public derivation
• implements: if class A implements an interface M, then it implements all M’s pure virtual functions; this is the only circumstance in which multiple inheritance is used in Symbian OS.
面向对象中,类与类之间的关系有些是不好把握的,《Symbian OS C++ for Mobile Phones Volume 3》书中的观点能有些启发吧!
- The Relationships Between Classes in Symbian OS C++ for Mobile Phones Volume 3
- Symbian OS C++ for Mobile Phones
- API Plug-in for the S60 3rd Edition SDK for Symbian OS, for C++, MR
- API Plug-in for the S60 3rd Edition SDK for Symbian OS, for C++, supporting Feature Pack 2
- API Plug-in for the S60 3rd Edition SDK for Symbian OS, for C++, supporting Feature Pack 1
- C mobile phones
- Games on Symbian OS: A Handbook for Mobile Development
- The different between #define and const for a constant in C
- The Symbian OS Architecture Sourcebook: Design and Evolution of a Mobile Phone OS
- Barracks at the base of mobile phones to read half the staff responsible for the content pipeline
- A few notes about the CommDb (use in Symbian OS)
- Programming for the series 60 platform and symbian OS
- Mobile phones
- Mobile phones
- Mobile phones
- Mobile phones
- A UML Model for Mobile Game on the Android OS
- symiban: 2nd_fp3 Ethernet plug-in for 60 2nd Ed. SDK for Symbian OS FP 3 上网
- 史上最牛最全的LINUX命令集
- 在动态连接库上运用Thread Local Storage
- Hibernate 发展之路
- 想成为嵌入式程序员必须知道的0x10个问题(转载)
- 使用Window API写注册表
- The Relationships Between Classes in Symbian OS C++ for Mobile Phones Volume 3
- JBoss Drools 规则引擎示例程序
- 关于CSS中内层使用float导致外层的背景无法显示的问题的解决方法
- INFORMIX--22590錯誤
- core dump解析(4)
- 测试工具大全(各类测试工具简介)
- php中完美解决flash上传文件不能带Cookies问题
- 案例----某网站品牌列表的效果
- 一段经典的javascript代码分析