pingus-devel
[Top][All Lists]
Advanced

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

Re: Creating custom debug streams


From: David Philippi
Subject: Re: Creating custom debug streams
Date: Thu, 6 Jun 2002 15:55:12 +0200
User-agent: KMail/1.4.1

On Thursday 06 June 2002 15:41, Ingo Ruhnke wrote:

> This way is better, we already have a bunch of #defines
> (PINGUS_DEBUG_ACTIONS) in globals.hh which can be reused for this.

Good to know. Any problems with changing the #defines to an enum? It's more 
object oriented that way and I think some tools might have better support 
for it (e.g. doxygen can link the members of an enum to the declaration if I 
remember right).

> Yep, because the gain might be smaller than the lose. Anyway I am not
> 100% sure (far from it) that it will cause throuble.

See other mail.

> Commit what you have, I don't care that much about such a micro
> detail.

OK, I'm commiting what's done so far, it's not yet complete but it works at 
this point. ;-)

> The purpose of MultiplexStream was in the first place only to
> multiplex a stream, but well, now it does some more (prefixing, etc.)
> and I am not sure if one could easily implement prefixing, etc. ontop
> of MultiplexStream, so renaming might be appropriate.

I changed the name to DebugStream already, sounds more appropriate to me.

> Neighter does me really understand was it does in every detail, I just
> copied most of the stuff from Console buffer, which I wrote after some
> tutorial I found some years back (sorry, don't have a link to that).

I'll see what I can find then. I don't like code with unknown meanings and 
overflow looks much more like it should detect if one tries to insert more 
data then the internal buffer may hold. Therefore, already return 0 doesn't 
look good to me.

Bye David




reply via email to

[Prev in Thread] Current Thread [Next in Thread]