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

- Main Page
- Namespaces
- Classes
- Files
- Directories

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

Public Member Functions | Public Attributes | Properties | Private Member Functions | Private Attributes

# 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]

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:

  R | Reporter 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:

  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.

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.

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.

## 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`[get, set]`

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

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

- ReporterMsg.cs

All Classes Namespaces Files Functions Variables Enumerations Properties Events