IGLib  1.5
The IGLib base library for development of numerical, technical and business applications.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events
IG.Lib.ReporterBase.TWClass Class Reference

A class for storing TextWriters and some data associated with them (such as the name of the file from which a TextWriter was created), which enables searching on basis of this data. More...

+ Collaboration diagram for IG.Lib.ReporterBase.TWClass:

Public Member Functions

 TWClass (ReporterBase R)
 Public constructor, requires the Reporter object on which this object is installed. More...
 
void ClearWriter ()
 
bool SetWriter (TextWriter writer, bool writeintro, bool disposewriter)
 Sets the basic text writer to which reporting is performed, but overrides the writeintro property by the 'writeintro' argument. More...
 
bool SetWriter (Stream stream, bool writeintro, bool disposewriter)
 Creates a TextWriter upon the stream and sets it as the basic TextWriter to which reporting is performed. Overrides the writeintro property by the 'writeintro' argument. More...
 
bool SetWriter (string filename, bool append, bool writeintro, bool disposewriter)
 Creates a TextWriter upon a file and sets it as the text writer to which reporting is also performed. The caller specifies whether to overwrite the file or to append to it, and whether the introductory text is written before reporting to the file begins. More...
 

Public Attributes

TextWriter Writer = null
 

Properties

string filename [get, protected set]
 
Stream stream [get, protected set]
 

Private Member Functions

 TWClass ()
 

Private Attributes

bool DisposeWriter = false
 
string _filename = null
 
Stream _stream = null
 
ReporterBase rep = null
 

Detailed Description

A class for storing TextWriters and some data associated with them (such as the name of the file from which a TextWriter was created), which enables searching on basis of this data.

Constructor & Destructor Documentation

IG.Lib.ReporterBase.TWClass.TWClass ( )
inlineprivate
IG.Lib.ReporterBase.TWClass.TWClass ( ReporterBase  R)
inline

Public constructor, requires the Reporter object on which this object is installed.

Parameters
RReporter object on which the created instance is installed.

Member Function Documentation

void IG.Lib.ReporterBase.TWClass.ClearWriter ( )
inline
bool IG.Lib.ReporterBase.TWClass.SetWriter ( TextWriter  writer,
bool  writeintro,
bool  disposewriter 
)
inline

Sets the basic text writer to which reporting is performed, but overrides the writeintro property by the 'writeintro' argument.

Parameters
writerTextwriter to which reporting will be performed.
writeintroOverrides the class' writeintro property (if true then introductory text is printed, regardless of the value of the property). If the introductory text is printed then the standard method is used, taking into account the introtext and programname properties.
disposewriterIndicates whether the TextWriter should be disposed when not used any more. Default is false when specifying a textwriter.
Returns
True if a new writer has been successfully set and is ready to use, false otherwise.

References IG.Lib.ReporterBase.TextWriterPrintIntro().

Referenced by IG.Lib.ReporterBase.AddTW().

bool IG.Lib.ReporterBase.TWClass.SetWriter ( Stream  stream,
bool  writeintro,
bool  disposewriter 
)
inline

Creates a TextWriter upon the stream and sets it as the basic TextWriter to which reporting is performed. Overrides the writeintro property by the 'writeintro' argument.

Parameters
writerTextwriter to which reporting will be performed.
writeintroOverrides the class' writeintro property (if true then introductory text is printed, regardless of the value of the property). If the introductory text is printed then the standard method is used, taking into account the introtext and programname properties.
disposewriterIndicates whether the TextWriter should be disposed when not used any more. Default is false when specifying a stream.
Returns
True if a new writer has been successfully set and is ready to use, false otherwise.

References IG.Lib.ReporterBase.ReserveReportError().

bool IG.Lib.ReporterBase.TWClass.SetWriter ( string  filename,
bool  append,
bool  writeintro,
bool  disposewriter 
)
inline

Creates a TextWriter upon a file and sets it as the text writer to which reporting is also performed. The caller specifies whether to overwrite the file or to append to it, and whether the introductory text is written before reporting to the file begins.

Parameters
filenameName of the file to which reporting will be performed.
appendIf false then eventual existing contents of the file are overwritten. Otherwise, new text is appended at the end of the file.
writeintroOverrides the class' writeintro property (if true then introductory text is printed, regardless of the value of the property). If the introductory text is printed then the standard method is used, taking into account the introtext and programname properties.
disposewriterIndicates whether the TextWriter should be disposed when not used any more. Default is true when specifying a file name.
Returns
True if a new writer has been successfully set and is ready to use, false otherwise.

References IG.Lib.ReporterBase.ReserveReportError().

Member Data Documentation

TextWriter IG.Lib.ReporterBase.TWClass.Writer = null
bool IG.Lib.ReporterBase.TWClass.DisposeWriter = false
private
string IG.Lib.ReporterBase.TWClass._filename = null
private
Stream IG.Lib.ReporterBase.TWClass._stream = null
private
ReporterBase IG.Lib.ReporterBase.TWClass.rep = null
private

Property Documentation

string IG.Lib.ReporterBase.TWClass.filename
getprotected set
Stream IG.Lib.ReporterBase.TWClass.stream
getprotected set

The documentation for this class was generated from the following file: