Re: Recursive dependencies



"Donny Viszneki" <donny viszneki gmail com> writes:

> On Mon, Dec 29, 2008 at 7:52 PM, Maciej Piechotka <uzytkownik2 gmail com> 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!
>

I mean of course GObject. Nothing formal does not exists but there are
common conventions - about which I ask.

Regards
-- 
I've probably left my head... somewhere. Please wait untill I find it.
Homepage (pl_PL): http://uzytkownik.jogger.pl/
(GNU/)Linux User: #425935 (see http://counter.li.org/)



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