
C++ Inheritance and OOD
GetRekt
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Effective C++: Item 40 -- Use multiple inheritance judiciously
注: 此为英文资料整理,如需翻译请私信或留评论Multiple Inheritance (MI) DefinitionMultiple inheritance just means inheriting from more than one base class, but it is not uncommon for MI to be found in hierarchies that hav...原创 2019-08-26 11:49:10 · 225 阅读 · 0 评论 -
Effective C++: Item 39 -- Use private inheritance judiciously
DefinitionPrivate inheritance doesn’t mean is-a. In contrast to public inheritance, compilers will generally not convert a derived class object into a base class object if the inheritance relationshi...原创 2019-08-23 11:32:04 · 174 阅读 · 0 评论 -
Effective C++: Item 38 -- Model “has-a” or “is-implemented-in-terms- of” through composition
DefinitionComposition is the relationship between types that arises when objects of one type contain objects of another type. Composition is also known as layering, containment, aggrega- tion, and em...原创 2019-08-22 21:32:08 · 293 阅读 · 1 评论 -
Pure Virtual Function, Abstract Class and Interface in C++
Pure Virtual FunctionA pure virtual function (or abstract function) in C++ is a virtual function for which we don’t have implementation, we only declare it. A pure virtual function is declared by ass...原创 2019-08-23 17:41:12 · 246 阅读 · 0 评论