![]() |
![]() |
Articles / TULARC / Software / OO Technology / | ![]() |
|
![]() |
||||
![]() |
![]() |
|||
![]() |
![]() |
|||
![]() |
||||
|
|
||||
![]() |
![]() |
|||
![]() |
4.1) What is Downcasting? (Object-Oriented Technology) |
![]() |
||
![]() |
||||
![]() |
![]() |
![]() |
||
![]() |
||||
![]() |
![]() |
![]() |
![]() |
||
![]() |
||
![]() |
![]() |
![]() |
![]() |
||
|
|
||
![]() |
||
![]() |
![]() |
![]() |
![]() |
||
![]() |
||
This article is from the Object-Oriented Technology FAQ, by Bob Hathaway rjh@geodesic.com with numerous contributions by others.
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:
programming, software, coding, Object-Oriented, language, dynamic binding, constructor, destructor, overriding, methods, inheritance, reflection, persistence, MFC, real-time, polymorphism, system, database, vendor
![]() |
|
|