First of all... sorry for the late answer.... Raphael Mack ha scritto: > Hi, > > in the G_LIST wrapper: > we need to cache the cache the eiffel objects, because we want the > following to hold: > > a_glist.item(1) = a_glist.item(1) > > And we also want: > > create a_glist2.copy(a_glist) > a_glist2.item(1) = a_glist.item(1) > > right? So we need to have a cache for item type. How can we ensure this? > Inheriting a proper WRAPPER_FACTORY in the effective G_LIST heir. G_LIST and all other WRAPPER_COLLECTION are deferred on purpose. In fact memory handling are handled in the most different ways by various C libraries; wrapper caching hence shall adapt to many policies. A common policy that fit all the cases either is not possible or is not efficient or I wan't able to conceive it.
You can find a couple examples: G_OBJECT_LIST which should pass many tests and GTK_TREE_PATH_LIST which is a quick-and-fast hack with some drawbacks. > Thanks in advance, > Thanks a lot to you... _______________________________________________ Eiffel-libraries-devel mailing list [email protected] https://mail.gna.org/listinfo/eiffel-libraries-devel
