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

- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events
Public Member Functions | Public Attributes | Properties | Private Member Functions | Private Attributes | List of all members
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:
[legend]

## 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 | ( |  | ) |
| inline private

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

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

Parameters

  R | Reporter object on which the created instance is installed.

## Member Function Documentation

void IG.Lib.ReporterBase.TWClass.ClearWriter | ( |  | ) |
| inline

Referenced by IG.Lib.ReporterBase.RemoveTextLoggers(), IG.Lib.ReporterBase.RemoveTextWriters(), and IG.Lib.ReporterBase.RemoveTW().

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

  writer | Textwriter to which reporting will be performed.
  writeintro | Overrides 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.
  disposewriter | Indicates 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

  writer | Textwriter to which reporting will be performed.
  writeintro | Overrides 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.
  disposewriter | Indicates 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

  filename | Name of the file to which reporting will be performed.
  append | If false then eventual existing contents of the file are overwritten. Otherwise, new text is appended at the end of the file.
  writeintro | Overrides 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.
  disposewriter | Indicates 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

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

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
| get protected set

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

Stream IG.Lib.ReporterBase.TWClass.stream
| get protected set

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

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

- igbase/reporter/ReporterMsg.cs