Solved

Dynamic Inheritance

Posted on 1998-04-27
3
504 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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
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 goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

746 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now