pingus-devel
[Top][All Lists]
Advanced

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

Re: Creating custom debug streams


From: Ingo Ruhnke
Subject: Re: Creating custom debug streams
Date: 06 Jun 2002 15:41:08 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

David Philippi <address@hidden> writes:

> 2. operator (int) combined with an enum { PINGUS_SOUND = 1, PINGUS_DISPLAY = 
>    2, PINGUS_X = 3, ... } this would prevent typos and one could add a
>    corresponding flag to each case stating wheter it should be displayed.

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

>> That gives IIRC some problem with some documentation tools, but I am
>> not sure if its an issue with doxygen.
> Are you saying that you'd not use a usefull feature because it makes problems 
> with a documentation tool?

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

> So if you don't cry out I'm going to change it, I've added a set_prefix () 
> and removed unneccessary code already and plan to add filter flags and 
> operator ().

Commit what you have, I don't care that much about such a micro
detail.
 
> Well, I don't think that there's too much functionality, in fact I'm planning 
> to include some more. ;-)
> MultiplexStream has nearly none in fact, most is in MultiplexStreamBuffer. 
> I'd propose to rename MultiplexStream to DebugStream and include all 
> necessary functionality to use it as a debugging system.

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.
 
> That explains a few things. I was wondering why three of six member
> variables where not used at all...
> On the other hand, a bit documentation about overflow () would be
> usefull, I can't say that I understand what this method does or who
> calls it. A reference to documentation about streambuf would be
> enough I think.

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).

-- 
Advent:     http://www.freesoftware.fsf.org/advent/
Feuerkraft: http://www.freesoftware.fsf.org/feuerkraft/
Pingus:     http://pingus.seul.org/           || ICQ:      59461927
Home:       http://pingus.seul.org/~grumbel/  || JabberID: address@hidden



reply via email to

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