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

IG::Lib::ReporterConsole_Base Class Reference

Base class for reporter classes that contain either reporting via system console, reporting via message box, or both. More...

Inheritance diagram for IG::Lib::ReporterConsole_Base:
Collaboration diagram for IG::Lib::ReporterConsole_Base:

List of all members.

Public Member Functions

override void Report (ReportType messagetype, string location, string message, Exception ex)
 Basic reporting method (overloaded). Launches an error report, a warning report or other kind of report/message. Supplemental data (such as objects necessary to launch visualize the report or operation flags) are obtained from the class' instance.

Public Attributes

ReportDelegate ReportDlgConsole = new ReportDelegate(DefaultReport_Console)
 Delegate that performs error reporting via console. It calls delegates ReportDlg to assemble error location information and ReportMessageDlg to assemble error message. Then it uses both to assemble the final decorated error message and launches it in its own way.
ReportLocationDelegate ReportLocationDlgConsole = new ReportLocationDelegate(DefaultReportLocation_Console)
 Delegate that assembles the error location string for reporting via console.
ReportMessageDelegate ReportMessageDlgConsole = new ReportMessageDelegate(DefaultReportMessage_Console)
 Delegate that assembles the eror message string for reporting via console.

Protected Member Functions

virtual void Report_Console (ReportType messagetype, string location, string message, Exception ex)
 Launches a report via console. Report is launched by using special delegates for this kind of reporting. If the corresponding delegates for error location and message are not specified then general delegates are used for this purporse, or location and message string are simple assembled by this function.

Static Protected Member Functions

static void DefaultReport_Console (ReporterBase reporter, ReportType messagetype, string location, string message)
 Delegat for launching a report via console.
static string DefaultReportLocation_Console (ReporterBase reporter, ReportType messagetype, string location, Exception ex)
 Delegate for assembling a location string for this kind of report.
static string DefaultReportMessage_Console (ReporterBase reporter, ReportType messagetype, string basicmessage, Exception ex)
 Delegate for assembling a report message for this kind of report.

Properties

virtual bool UseConsole [get, set]
 Gets or sets the flag specifying whether reporting using the system console is performed or not.

Detailed Description

Base class for reporter classes that contain either reporting via system console, reporting via message box, or both.

Code common to all classes is put here. Dhis is to reduce duplication of code as much as possible, while at the same time achieving pure behavior: a class intended for reporting via message boxes but not via console does not enable reporting in a console; the class intended for reporting only via message box does not enable reporting via co nsole; but still there can be a class that enables both, with only small portions of code duplicated form both classes. Interfaces are intended to clearly distinguish between various functionality supported.


Member Function Documentation

override void IG::Lib::ReporterConsole_Base::Report ( ReportType  messagetype,
string  location,
string  message,
Exception  ex 
) [inline, virtual]

Basic reporting method (overloaded). Launches an error report, a warning report or other kind of report/message. Supplemental data (such as objects necessary to launch visualize the report or operation flags) are obtained from the class' instance.

Parameters:
messagetypeThe type of the report (e.g. Error, Warning, etc.).
locationUser-provided description of error location.
messageUser-provided description of error.
exException thrown when error occurred.

Reimplemented from IG::Lib::ReporterBase.

Reimplemented in IG::Lib::ReporterConsoleMsgboxSpeech_Base, and IG::Forms::ReporterConsoleMsgbox_Base.

static void IG::Lib::ReporterConsole_Base::DefaultReport_Console ( ReporterBase  reporter,
ReportType  messagetype,
string  location,
string  message 
) [inline, static, protected]

Delegat for launching a report via console.

Parameters:
reporterReporter object where additional information can be found.
messagetypeType of the report(Error, Warning, Info...).
locationShort string desctribing location where report was triggered.
messageMessage of the report.
static string IG::Lib::ReporterConsole_Base::DefaultReportLocation_Console ( ReporterBase  reporter,
ReportType  messagetype,
string  location,
Exception  ex 
) [inline, static, protected]

Delegate for assembling a location string for this kind of report.

Parameters:
reporterReporter object where additional information can be found.
messagetypeType of the report(Error, Warning, Info...).
locationUser provided location string.
exException that triggered reporting.
Returns:
Location string that can be used in a report.
static string IG::Lib::ReporterConsole_Base::DefaultReportMessage_Console ( ReporterBase  reporter,
ReportType  messagetype,
string  basicmessage,
Exception  ex 
) [inline, static, protected]

Delegate for assembling a report message for this kind of report.

Parameters:
reporterReporter object where additional information can be found.
messagetypeType of the report(Error, Warning, Info...).
basicmessageUser provided message string.
exException that triggered reporting.
Returns:
Message string that can be used in a report.
virtual void IG::Lib::ReporterConsole_Base::Report_Console ( ReportType  messagetype,
string  location,
string  message,
Exception  ex 
) [inline, protected, virtual]

Launches a report via console. Report is launched by using special delegates for this kind of reporting. If the corresponding delegates for error location and message are not specified then general delegates are used for this purporse, or location and message string are simple assembled by this function.

Parameters:
messagetypeType of the report(Error, Warning, Info...).
locationUser provided location string.
messageUser provided message string.
exException that triggered reporting.

Member Data Documentation

ReportDelegate IG::Lib::ReporterConsole_Base::ReportDlgConsole = new ReportDelegate(DefaultReport_Console)

Delegate that performs error reporting via console. It calls delegates ReportDlg to assemble error location information and ReportMessageDlg to assemble error message. Then it uses both to assemble the final decorated error message and launches it in its own way.

ReportLocationDelegate IG::Lib::ReporterConsole_Base::ReportLocationDlgConsole = new ReportLocationDelegate(DefaultReportLocation_Console)

Delegate that assembles the error location string for reporting via console.

ReportMessageDelegate IG::Lib::ReporterConsole_Base::ReportMessageDlgConsole = new ReportMessageDelegate(DefaultReportMessage_Console)

Delegate that assembles the eror message string for reporting via console.


Property Documentation

virtual bool IG::Lib::ReporterConsole_Base::UseConsole [get, set]

Gets or sets the flag specifying whether reporting using the system console is performed or not.

Implements IG::Lib::IReporterConsole.

Reimplemented in IG::Lib::ReporterConsole, and IG::Forms::ReporterMsgbox.


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