Re: GObject Singleton

2005-09-08 Thread Stefan Kost
hi, Uzytkownik wrote: I have singleton A and subclass B, C and D. 1. How do it in GObject? The sigleton pattern is usually realized by having a factory method. The application would use e.g. gdk_display_manager_get() which returns a reference to always the same GdkDisplayManager object.

Re: GObject singleton.

2005-09-08 Thread Stefan Kost
hi, Uzytkownik wrote: I have class A(abstract), which is singleton. It have subclasses called B, C and D. Is it possible that create class B overload static A methods? If A is abstract, than the default virtual methods will just have a g_return_if_reached() and a subclass not overloading

GObject Singleton

2005-09-07 Thread Uzytkownik
I have singleton A and subclass B, C and D. 1. How do it in GObject? 2. Can I do something that I cannot have B or D at the same time? Regards ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org

GObject singleton.

2005-09-07 Thread Uzytkownik
I have class A(abstract), which is singleton. It have subclasses called B, C and D. Is it possible that create class B overload static A methods? Something like: mylib_b_init(); mylib_a_do_something(); //mylib_b_do_something I prefer that user (it's library) can create next subclass. Regards