IGLib 1.4
The IGLib base library for development of numerical, technical and business applications.

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:

List of all members.

Public Member Functions

 TWClass (ReporterBase R)
 Public constructor, requires the Reporter object on which this object is installed.
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.
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.
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.

Public Attributes

TextWriter Writer = null

Properties

string filename [get, set]
Stream stream [get, 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 ( ) [inline, private]
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.
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.
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.

Member Data Documentation

Stream IG::Lib::ReporterBase::TWClass::_stream = null [private]

Property Documentation

string IG::Lib::ReporterBase::TWClass::filename [get, set]
Stream IG::Lib::ReporterBase::TWClass::stream [get, set]

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations Properties Events