Log of /trunk/gui/gui/inc/TGRedirectOutputGuard.h
Parent Directory
Revision
13292 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Nov 21 00:25:38 2005 UTC (9 years, 2 months ago) by
rdm
Original Path:
trunk/gui/inc/TGRedirectOutputGuard.h
File length: 3042 byte(s)
Diff to
previous 12928
From Bertrand:
- added comments in TGMdi classes.
- added comments in TGColorSelect and TGColorDialog classes.
- added comments in TGFontDialog classes.
- changes in all these classes to make rulechecker happy.
- added a new member / option in TGListTree allowing to disable
item opening on doubleclick.
Revision
12928 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Added
Tue Oct 11 12:39:36 2005 UTC (9 years, 3 months ago) by
rdm
Original Path:
trunk/gui/inc/TGRedirectOutputGuard.h
File length: 3031 byte(s)
From Gerri:
This patch contains two new very small utility classes:
1. base/inc/TRedirectOutputGuard.h
Very simple guard class for RedirectOutput (similar to TLockGuard)
to redirect the output to a file. Usage:
void redir() {
TRedirectOutputGuard guard("/tmp/pippo.txt","w");
Printf("Here we go ...");
cout << "Me too!" << endl;
}
If the file does not exist it is created. The mode has the same meaning
as in TSystem::RedirectOutput(). When the guard object goes out of scope
the redirection is restored to stdout and stderr, this is exception
safe.
2. gui/inc/TGRedirectOutputGuard.h, gui/src/TGRedirectOutputGuard.cxx
Same functionality but with a text frame window. Usage:
#include "TGTextView.h"
void guiredir(TGTextView *tv, const char *fout, const char *mode) {
TGRedirectOutputGuard guard(tv, fout, mode);
Printf("Here we go ...");
cout << "Me too!" << endl;
}
where 'tv' is a TGTextView object initialized by the caller; optionally
one can save the logs into a file.
This form allows you to request diffs between any two revisions of this file.
For each of the two "sides" of the diff,
enter a numeric revision.