class TGRedirectOutputGuard


TGRedirectOutputGuard

This class provides output redirection to a TGTextView in guaranteed
exception safe way. Use like this:
{
TGRedirectOutputGuard guard(textview);
... // do something
guard.Update();
... // do something else
}
when guard goes out of scope, Update() is called to flush what left
n the screed and the output is automatically redirected again t
the standard units.
The exception mechanism takes care of calling the dtors
of local objects so it is exception safe.
Optionally the output can also be saved into a file:
{
TGRedirectOutputGuard guard(textview, file, mode);
... // do something
}


Function Members (Methods)

public:
TGRedirectOutputGuard(const TGRedirectOutputGuard&)
TGRedirectOutputGuard(TGTextView* tv, const char* flog = 0, const char* mode = "a")
virtual~TGRedirectOutputGuard()
static TClass*Class()
virtual TClass*IsA() const
TGRedirectOutputGuard&operator=(const TGRedirectOutputGuard&)
virtual voidShowMembers(TMemberInspector& insp, char* parent)
virtual voidStreamer(TBuffer& b)
voidStreamerNVirtual(TBuffer& b)
voidUpdate()

Data Members

private:
TStringfLogFile
FILE*fLogFileRead
TGTextView*fTextView
Bool_tfTmpFile

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

TGRedirectOutputGuard(TGTextView* tv, const char* flog = 0, const char* mode = "a")
void Update()

Author: G. Ganis 10/10/2005
Last update: root/gui:$Id: TGRedirectOutputGuard.h 20882 2007-11-19 11:31:26Z rdm $
Copyright (C) 1995-2005, Rene Brun and Fons Rademakers. *

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.