Multiple Herencies or how to change the base GObject



I have the following hierarchy:

Base Object
|
|- - - - > Object

The actual code use a Base object witch implements a type of data
access method (XML file and others), but I want to add the use of a
diferent one: the Gnome Database Access (GDA, www.gnome-db.org). I
want to keep both methods and make transparent, for the derived
Object, the use of one or other. It's a big proyect, then I need to
make as less modifications as I can), then:

How can the derived object calls the rights functions to use the
Orignal GObject method or the GDA one?

Does the following solution is releable?

GInterface
|
|- - - -> Data Access Interface

GObject
|
|- - - - > OriginalBaseObject that "use" the Original Data Access and
Implements DataAccessInterface

GObject
|
| - - - - > GDAObject that "use" GDA and Implements DataAccessInterface

New Base Object (with a pointer to a GObject that implements
DataAccessInterface)
|
|- - - - - > Object

Are there any other way to resolve the problem?
-- 
Trabajar, la mejor arma para tu superación
"de grano en grano, se hace la arena" (R) (entrámite, pero para los
cuates: LIBRE)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]