lotus

previous page: 3.17) What Tutorials Are Available On Object-Oriented Concepts and Languages?
  
page up: Object-Oriented Technology FAQ
  
next page: 4.2) What are Virtual Functions? (Object-Oriented Technology)

4.1) What is Downcasting? (Object-Oriented Technology)




Description

This article is from the Object-Oriented Technology FAQ, by Bob Hathaway rjh@geodesic.com with numerous contributions by others.

4.1) What is Downcasting? (Object-Oriented Technology)

Downcasting is the term used in C++ for casting a pointer or reference to
a base class to a derived class. This should usually be checked with an
embedded dynamic typing scheme if such a scheme is not present in the
language, such as with a typecase (Modula-3) or inspect (Simula) construct.
In C++, it is even possible to use conversion functions to perform some
checks, although the proposed RTTI will perform checked downcasting as
its primary ability.

 

Continue to:













TOP
previous page: 3.17) What Tutorials Are Available On Object-Oriented Concepts and Languages?
  
page up: Object-Oriented Technology FAQ
  
next page: 4.2) What are Virtual Functions? (Object-Oriented Technology)