Solved

Dynamic Inheritance

Posted on 1998-04-27
3
513 Views
Last Modified: 2008-03-03
Can you please tell me clearly the concept called " Dynamic inheritance".
My understanding is, Dynamic inheritance allows objects to change and evolve over time. I read like this :  Dynamic inheritance refers to the ability to add, delete,or change parents from objects (or classes) at run-time.Is it only means that we can change the properties of a Base class through the derived class at the run time?.
Expecting more explanations about this concept from all of you Experts !.
0
Comment
Question by:sreejesh
3 Comments
 
LVL 11

Accepted Solution

by:
alexo earned 10 total points
ID: 1164272
Your first statement was correct.  Dynamic inheritance means changing parents.
C++ does not support dynamic inheritance as-is, however it can be faked.

Here's a quote from the Object-Orientation FAQ:

1.10) What Is Dynamic Inheritance?

Dynamic inheritance allows objects to change and evolve over time.  Since base classes provide properties and attributes for objects, changing base classes changes the properties and attributes of a class.  A previous example was a window changing into an icon and then back again, which involves changing a base class between a window and icon class.

More specifically, dynamic inheritance refers to the ability to add, delete, or change parents from objects (or classes) at run-time.  Actors, CLOS, and Smalltalk provide dynamic inheritance in some form or other.  Single hierarchy systems, such as Self, provide dynamic inheritance in the form of delegation [Ungar 87].

4.4) Can I Use Dynamic Inheritance In C++?

Yes, [Coplien 92] describes a scheme where a class can contain a pointer to a base class that can switch between its derived classes, providing a limited form.  Earlier chapters contain entries on bypassing C++'s message system and even bypassing static linking.

[Coplien 92] James O. Coplien.  Advanced C++ Programming Styles and Idioms.  Addison Wesley.
Covers advanced C++ programming and performing other more advanced and dynamic styles of OO in C++.


0
 
LVL 5

Expert Comment

by:yonat
ID: 1164273
0
 

Author Comment

by:sreejesh
ID: 1164274
Thank You Yonat.Now I got the concept of Dynamic Inheritance throug the given site.Thank You very much.
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question