Re: Recursive dependencies

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

 



On Mon, Dec 29, 2008 at 7:52 PM, Maciej Piechotka <uzytkownik2@xxxxxxxxx> wrote:
> Hello. How to handle it in the most glib-style. I have a 2 classes - A
> and B.
> A:
> - Should have a virtual method returning B
> B:
> - Should have a virtual method returning A

Your use of the term "classes" in a question about the "most
glib-style" way of doing something intrigues and confounds me.

If you're using C++, a forward declaration of a class is very simple:

class ClassName;

This construct is obviously useful for correctly parsing code with
cyclical (not quite the same as recursive!) dependencies.

On the other hand, C is what I think of when I think of "most glib
style." But that doesn't make sense either since there are no formal
classes in C, and therefore no formal language for virtual methods!

--
http://codebad.com/
_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux