Re: Pluggable widget types and implementations

On Sun, 10 Dec 2006, Damon Chaplin wrote:

On Fri, 2006-12-08 at 18:36 +0100, Tim Janik wrote:

i'm still interested in hearing use cases for multiple factories though,
so if anyone has arguments for allowing multiple GFactory* handles instead
of just two "singleton" functions:

   /* craete instance conforming to prerequisite_type */
   g_factory_create (GType prerequisite_type);

   /* appoint an implementaiton_type for a prerequisite_type */
   g_factory_appoint_type (GType prerequisite_type,
                           GType implementation_type);

I think the terms "appoint" and "prerequisite" are a bit confusing.

I'd prefer the simpler:
   g_factory_create (GType type);

   g_factory_override_type (GType original_type,
                            GType override_type);

well, "prerequisite" is consistent with established naming in the type system,
and "override" doesn't really seem appropriate if prerequisite_type is a
non-instantiale interface type, and implementation_type is an instance type
which happens to implement the interface type.

any other suggestions for replacing "appoint"?



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