UpOrDown 

HOME INDEX SEARCH GO  

 <<O>>  Difference Topic UpOrDown (r1.1 - 04 Jun 2003 - TimurZambalayev)
Added:
>
>

%META:TOPICINFO{author="TimurZambalayev" date="1054743960" format="1.0" version="1.1"}% %META:TOPICPARENT{name="TimurZambalayev"}% "Casting from a bse class to a derived class is often called a downcast because of the convention of drawing inheritance trees growing from the root down." (Bjarne Stroustrup. The C++ Programming Language. Special 3rd Edition. Section 15.4, page 408).

"Why “upcasting”? The reason for the term is historical, and based on the way class inheritance diagrams have traditionally been drawn: with the root at the top of the page, growing downward. (Of course, you can draw your diagrams any way you find helpful.) [...] Casting from a derived type to a base type moves up on the inheritance diagram, so it’s commonly referred to as upcasting." (Bruce Eckel. Thinking In Java. 3rd Edition)

See also http://www.refactoring.com/catalog/pushDownMethod.html and http://www.refactoring.com/catalog/pullUpMethod.html

-- TimurZambalayev - Jun 04, 2003


View | Diffs | r1.1 | More

e d i t a t t a c h r e f - b y d i f f s
Ideas,requests,problems regarding this site? Send feedback.
Copyright @ 2000-2003 by the contribution authors. All material on this collaboration tool is the property of the contributing authors.

Revision -
Revision r1.1 - 04 Jun 2003 - 16:26 GMT - TimurZambalayev
Copyright © 2001 by the contributing authors. All material on this collaboration tool is the property of the contributing authors.
Ideas, requests, problems regarding this site? Send feedback.