[Top][All Lists]
[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 16:34:40 +0200 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 |
David Philippi <address@hidden> writes:
> Good to know. Any problems with changing the #defines to an enum?
No.
> 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).
enum SomeEnum { A, B, C, ...};
doesnt work under MSVC, so one has to write:
typedef enum { A, B, C, ...} SomeEnum;
Also make sure that the values stay the same, since they are used as a
bitmask.
> 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.
As far as I remember overflow(int c) is called when the buffer is
full, so that one can clear the buffer and write out the content. 'c'
is the character which caused the overflow, so one also has to output
that. sync() does the same, but not on an overfull buffer, but instead
it can be triggered with a std::flush.
--
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
- Creating custom debug streams, David Philippi, 2002/06/05
- Re: Creating custom debug streams, Ingo Ruhnke, 2002/06/05
- Re: Creating custom debug streams, Kenneth Gangstoe, 2002/06/05
- Re: Creating custom debug streams, David Philippi, 2002/06/06
- Re: Creating custom debug streams, Ingo Ruhnke, 2002/06/06
- Re: Creating custom debug streams, David Philippi, 2002/06/06
- Re: Creating custom debug streams, Ingo Ruhnke, 2002/06/06
- Re: Creating custom debug streams, David Philippi, 2002/06/06
- Re: Creating custom debug streams,
Ingo Ruhnke <=
- Re: Creating custom debug streams, David Philippi, 2002/06/06
- Re: Creating custom debug streams, David Philippi, 2002/06/06
- Re: Creating custom debug streams, David Philippi, 2002/06/06
Re: Creating custom debug streams, David Philippi, 2002/06/06