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

IG::Lib::ReporterBase Class Reference

Base IGlib class for reporting, tracing and logging; provides a global reporter and a basis for creation of local reporters. This class is identical to the IGLib class (copied directly). IN EFA, refer to the derived class Reporter! More...

Inheritance diagram for IG::Lib::ReporterBase:
Collaboration diagram for IG::Lib::ReporterBase:

List of all members.

Classes

class  TWClass
 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...

Public Member Functions

 ReporterBase ()
 Constructor. Initializes all error reporting delegates to default values and sets auxliary object to null. Auxiliary object Obj is set to null.
 ReporterBase (object obj, ReportDelegate reportdelegate, ReportLocationDelegate locationdelegate, ReportMessageDelegate messagedelegate, ReserveReportErrorDelegate reservereportdelegate)
 Constructor. Initializes the error reporter by the specified auxiliary object and delegates used to perform error reporting tasks. Delegates that are not specified are set to default values.
 ReporterBase (object obj, ReportDelegate reportdelegate, ReportLocationDelegate locationdelegate, ReportMessageDelegate messagedelegate)
 Constructor. Initializes the error reporter by the specified auxiliary object and delegates used to perform error reporting tasks. Reserve error reporting delegate is initialized to a default value. Delegates that are not specified are set to default values.
 ReporterBase (object obj, ReportDelegate reportdelegate)
 Constructor. Initializes the error reporter by the specified auxiliary object and the delegate to perform error reporting tasks. Reserve error reporting delegate is initialized to a default value. Delegates for assembling the error location string and error message string are set to their default values, which are adapted to console-like eror reporting systems.
 ReporterBase (object obj, ReportDelegate reportdelegate, ReserveReportErrorDelegate reservereportdelegate)
 Constructor. Initializes the error reporter by the specified auxiliary object and delegates used to perform error reporting tasks. Delegates for assembling the error locatin and error message string are set to their default values, which are adapted to console-like eror reporting systems.
void Init (object obj, ReportDelegate reportdelegate, ReportLocationDelegate locationdelegate, ReportMessageDelegate messagedelegate, ReserveReportErrorDelegate reservereportdelegate)
 Initializes the error reporter by the specified auxiliary object and delegates used to perform error reporting tasks. Delegates that are not specified are set to default values.
void Init ()
 Initializes all error reporting delegates to default values and sets auxliary object to null. Auxiliary object Obj is set to null.
void Init (object obj, ReportDelegate reportdelegate, ReportLocationDelegate locationdelegate, ReportMessageDelegate messagedelegate)
 Initializes the error reporter by the specified auxiliary object and delegates used to perform error reporting tasks. Reserve error reporting delegate is initialized to a default value. Delegates that are not specified are set to default values.
void Init (object obj, ReportDelegate reportdelegate)
 Initializes the error reporter by the specified auxiliary object and the delegate to perform error reporting tasks. Reserve error reporting delegate is initialized to a default value. Delegates for assembling the error location string and error message string are set to their default values, which are adapted to console-like eror reporting systems.
void Init (object obj, ReportDelegate reportdelegate, ReserveReportErrorDelegate reservereportdelegate)
 Initializes the error reporter by the specified auxiliary object and delegates used to perform error reporting tasks. Delegates for assembling the error locatin and error message string are set to their default values, which are adapted to console-like eror reporting systems.
void Dispose ()
bool AppSettingsRead (string groupname)
 Returns a flag that tells whether configuration settings with a given group name have already been read for this reporter.
bool AppSettingsRead ()
 Returns a flag that tells whether general configuration settings (not belonging to any group) have already been read for this reporter.
void ReadAppSettings (string groupname, bool onlyonce)
 Reads settings for a specified named group of reporters from the application configuration file.
void ReadAppSettings (string groupname)
 Reads settings for a specified named group of reporters from the application configuration file.
void ReadAppSettings ()
 Reads common reporter settings (i.e. settings that are not assigned for any named group) from the application configuration file.
void IncreaseDepth ()
 Increases indentation level by 1.
void IncreaseDepth (int numlevels)
 Increases indentation level by the specified number of levels (can be 0 or negative).
void DecreaseDepth ()
 Decreases indentation level by 1.
void DecreaseDepth (int numlevels)
 Decreases indentation level by the specified number of levels (can be 0 or negative).
void ResetLevels ()
 Resets the various kinds of reporting levels to default values.
bool DoReporting (ReportType reptype)
 Returns true if the report of a given type should be shown by user interface (according to ReportingLevel), and false if not.
bool DoLogging (ReportType reptype)
 Returns true if the report of a given type should be logged in log files (according to ReportingLevel), and false if not.
bool DoTracing (ReportType reptype)
 Returns true if the report of a given type should traced (according to ReportingLevel), and false if not.
virtual 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.
void Report (ReportType messagetype, string message, Exception ex)
 Launches a report. Predominantly for error and warning reports.
void Report (ReportType messagetype, Exception ex, string location)
 Launches a report. Predominantly for error and warning reports.
void Report (ReportType messagetype, Exception ex)
 Launches a report. Predominantly for error and warning reports.
void Report (ReportType messagetype, string location, string message)
 Launches a report.
void Report (ReportType messagetype, string message)
 Launches a report.
void ReportError (string location, string message, Exception ex)
 Basic error reporting method (overloaded). Supplemental data (such as objects necessary to launch visualize the report or operation flags) are obtained from the class' instance.
void ReportError (string message, Exception ex)
 Launches an error report.
void ReportError (Exception ex, string location)
 Launches an error report.
void ReportError (Exception ex)
 Launches an error report. Predominantly for error and warning reports.
void ReportError (string location, string message)
 Launches an error report.
void ReportError (string message)
 Launches an error report.
void ReportWarning (string location, string message, Exception ex)
 Basic warning reporting method (overloaded). Supplemental data (such as objects necessary to launch visualize the report or operation flags) are obtained from the class' instance.
void ReportWarning (string message, Exception ex)
 Launches a warning report.
void ReportWarning (Exception ex, string location)
 Launches a warning report.
void ReportWarning (Exception ex)
 Launches a warning report. Predominantly for error and warning reports.
void ReportWarning (string location, string message)
 Launches a warning report.
void ReportWarning (string message)
 Launches a warning report.
void ReportInfo (Exception ex)
 Launches an info.
void ReportInfo (string location, string message)
 Launches an info.
void ReportInfo (string message)
 Launches an info.
bool SetTW (ref TextWriter tw, ref bool disptw, 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.
bool SetTextWriter (TextWriter writer)
 Sets the text writer to which reporting is also performed.
bool SetTextWriter (TextWriter writer, bool writeintro)
 Sets the basic text writer to which reporting is performed, but overrides the writeintro property by the 'writeintro' argument.
bool SetTextWriter (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 SetTextWriter (Stream stream)
 Creates a TextWriter upon the stream and sets it as the text writer to which reporting is also performed.
bool SetTextWriter (Stream stream, bool writeintro)
 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 SetTextWriter (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 SetTextWriter (string filename)
 Creates a TextWriter upon a file and sets it as the basic TextWriter to which reporting is also performed. The file is overwritten.
bool SetTextWriter (string filename, bool append)
 Creates a TextWriter upon a file and sets it as the basic TextWriter to which reporting is also performed, where the caller specifies either to overwrite the file or to append to it.
bool SetTextWriter (string filename, bool append, bool writeintro)
 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.
bool SetTextWriter (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.
bool AddTextWriter (TextWriter writer)
 Sets the text writer to which reporting is also performed.
bool AddTextWriter (TextWriter writer, bool writeintro)
 Sets the basic text writer to which reporting is performed, but overrides the writeintro property by the 'writeintro' argument.
bool AddTextWriter (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 AddTextWriter (Stream stream)
 Creates a TextWriter from the stream and adds it to the list of TextWriters on which reporting is also performed.
bool AddTextWriter (Stream stream, bool writeintro)
 Creates a TextWriter from the stream and adds it to the list of TextWriters on which reporting is also performed. Overrides the writeintro property by the 'writeintro' argument.
bool AddTextWriter (Stream stream, bool writeintro, bool disposewriter)
 Creates a TextWriter from the stream and adds it to the list of TextWriters on which reporting is also performed. Overrides the writeintro property by the 'writeintro' argument.
bool AddTextWriter (string filename)
 Creates a TextWriter from the file name and adds it to the list of TextWriters on which reporting is also performed. The file is overwritten.
bool AddTextWriter (string filename, bool append)
 Creates a TextWriter from the stream and adds it to the list of TextWriters on which reporting is also performed. The caller specifies either to overwrite the file or to append to it.
bool AddTextWriter (string filename, bool append, bool writeintro)
 Creates a TextWriter from the stream and adds it to the list of TextWriters on 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.
bool AddTextWriter (string filename, bool append, bool writeintro, bool disposewriter)
 Creates a TextWriter from the stream and adds it to the list of TextWriters on 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.
bool RemoveTextWriters ()
 Removes all text writers from the TextWriter subsystem. If appropriate, the corresponding text writer is closed.
bool RemoveTextWriter ()
 Removes the default text writer from the TextWriter subsystem. If appropriate, the corresponding text writer is closed.
bool RemoveTextWriter (TextWriter writer)
 Removes the first object from Writers that contains the specified TextWriter. If appropriate, the corresponding text writer is closed.
bool RemoveTextWriter (Stream stream)
 Removes the first object from Writers whose TextWriter has been created form the specified stream. If appropriate, the corresponding text writer is closed.
bool RemoveTextWriter (string filename)
 Removes the first object from Writers whose TextWriter has been created form the file with the specified name. If appropriate, the corresponding text writer is closed.
List< TextWriter > TextWriterWriters ()
 Returns a list of all text writers that are currently used by the reporter's text writer. Only text writers that are actually writable are included.
List< TextWriter > TextWriterWriters (bool writableonly)
 Returns a list of all text writers that are currently used by the reporter's text writer. Warning: Beware of thread safety issues! Blocks of code where the returned list is used should be enclosed in lock(reporter.lockobj){...} block (where reporter is the object through which this method was called).
int TextWriterNumWriters ()
 Returns the current number of text writers used by the reporter's text logging module. Only text writers that are actually writable are counted.
int TextWriterNumWriters (bool writableonly)
 Returns the current number of TextWriters used by the reporter's text logging module.
int TextWriterFlush ()
 Flushes all text writers of the Writer's TextWriter subsystem.
int TextWriterWrite (string str)
 Writes a string to all text writers of the Writer's TextWriter subsystem.
int TextWriterWriteLine (string str)
 Similar to TextWriterWrite(), except that a newline is added at the end of the string.
bool SetTextLogger (TextWriter writer)
 Sets the text writer to which reporting is also performed.
bool SetTextLogger (TextWriter writer, bool writeintro)
 Sets the basic text writer to which reporting is performed, but overrides the writeintro property by the 'writeintro' argument.
bool SetTextLogger (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 SetTextLogger (Stream stream)
 Creates a TextWriter upon the stream and sets it as the text writer to which reporting is also performed.
bool SetTextLogger (Stream stream, bool writeintro)
 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 SetTextLogger (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 SetTextLogger (string filename)
 Creates a TextWriter upon a file and sets it as the basic TextWriter to which reporting is also performed. The file is overwritten.
bool SetTextLogger (string filename, bool append)
 Creates a TextWriter upon a file and sets it as the basic TextWriter to which reporting is also performed, where the caller specifies either to overwrite the file or to append to it.
bool SetTextLogger (string filename, bool append, bool writeintro)
 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.
bool SetTextLogger (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.
bool AddTextLogger (TextWriter writer)
 Sets the text writer to which reporting is also performed.
bool AddTextLogger (TextWriter writer, bool writeintro)
 Sets the basic text writer to which reporting is performed, but overrides the writeintro property by the 'writeintro' argument.
bool AddTextLogger (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 AddTextLogger (Stream stream)
 Creates a TextWriter from the stream and adds it to the list of TextWriters on which reporting is also performed.
bool AddTextLogger (Stream stream, bool writeintro)
 Creates a TextWriter from the stream and adds it to the list of TextWriters on which reporting is also performed. Overrides the writeintro property by the 'writeintro' argument.
bool AddTextLogger (Stream stream, bool writeintro, bool disposewriter)
 Creates a TextWriter from the stream and adds it to the list of TextWriters on which reporting is also performed. Overrides the writeintro property by the 'writeintro' argument.
bool AddTextLogger (string filename)
 Creates a TextWriter from the file name and adds it to the list of TextWriters on which reporting is also performed. The file is overwritten.
bool AddTextLogger (string filename, bool append)
 Creates a TextWriter from the stream and adds it to the list of TextWriters on which reporting is also performed. The caller specifies either to overwrite the file or to append to it.
bool AddTextLogger (string filename, bool append, bool writeintro)
 Creates a TextWriter from the stream and adds it to the list of TextWriters on 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.
bool AddTextLogger (string filename, bool append, bool writeintro, bool disposewriter)
 Creates a TextWriter from the stream and adds it to the list of TextWriters on 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.
bool RemoveTextLoggers ()
 Removes all text writers from the TextLogger subsystem. If appropriate, the corresponding text writer is closed.
bool RemoveTextLogger ()
 Removes the default text writer from the TextLogger subsystem. If appropriate, the corresponding txt writer is closed.
bool RemoveTextLogger (TextWriter writer)
 Removes the first object from Loggers that contains the specified TextWriter. If appropriate, the corresponding text writer is closed.
bool RemoveTextLogger (Stream stream)
 Removes the first object from Loggers whose TextWriter has been created form the specified stream. If appropriate, the corresponding text writer is closed.
bool RemoveTextLogger (string filename)
 Removes the first object from Loggers whose TextWriter has been created form the file with the specified name. If appropriate, the corresponding text writer is closed.
List< TextWriter > TextLoggerWriters ()
 Returns a list of all text writers that are currently used by the reporter's text logger. Only text writers that are actually writable are included.
List< TextWriter > TextLoggerWriters (bool writableonly)
 Returns a list of all text writers that are currently used by the reporter's text logger. Warning: Beware of thread safety issues! Blocks of code where the returned list is used should be enclosed in lock(reporter.lockobj){...} block (where reporter is the object through which this method was called).
int TextLoggerNumWriters ()
 Returns the current number of text writers used by the reporter's text logging module. Only text writers that are actually writable are counted.
int TextLoggerNumWriters (bool writableonly)
 Returns the current number of TextWriters used by the reporter's text logging module.
int TextLoggerFlush ()
 Flushes all text writers of the Writer's TextLogger subsystem.
int TextLoggerWrite (string str)
 Writes a string to all text writers of the Writer's TextLogger subsystem.
int TextLoggerWriteLine (string str)
 Similar to TextLoggerWrite(), except that a newline is added at the end of the string.

Static Public Member Functions

static Exception ReviseException (Exception ex, string messageaddition, Type newtype, bool sametype, bool keepmessage, bool oldasinner)
 Takes an existing exception and returns a modified exception based on it.
static Exception ReviseException (Exception ex, string messageaddition)
 Takes an existing exception and returns a modified exception based on it. The returned exception is of the same type as the original one. Original message is appended to messageaddition . The created exception does not have an inner exception.
static Exception ReviseException (Exception ex, string messageaddition, bool keepmessage)
 Takes an existing exception and returns a modified exception based on it. The returned exception is of the same type as the original one. The created exception does not have an inner exception.
static Exception ReviseException (Exception ex, string messageaddition, bool keepmessage, bool oldasinner)
 Takes an existing exception and returns a modified exception based on it. The returned exception is of the same type as the original one.
static Exception ReviseException (Exception ex, string messageaddition, Type newtype)
 Takes an existing exception and returns a modified exception based on it. Original message is appended to messageaddition . The created exception does not have an inner exception.
static Exception ReviseException (Exception ex, string messageaddition, Type newtype, bool keepmessage)
 Takes an existing exception and returns a modified exception based on it. The created exception does not have an inner exception.
static Exception ReviseException (Exception ex, string messageaddition, Type newtype, bool keepmessage, bool oldasinner)
 Takes an existing exception and returns a modified exception based on it.
static void GetAppSetting (string key, ref string value, out bool assigned)
 Reads a string value from the application configuration file (e.g. app.config) and assigns it to the specified variable.
static void GetAppSetting (string key, ref char value, out bool assigned)
 Reads a character value from the application configuration file and assigns it to the specified variable.
static void GetAppSetting (string key, ref List< char > value, out bool assigned)
 Reads a list of characters from the application configuration file and assigns it to the specified variable.
static void GetAppSetting (string key, ref int value, out bool assigned)
 Reads an integer value from the application configuration file and assigns it to the specified variable.
static void GetAppSetting (string key, ref double value, out bool assigned)
 Reads a floating point value from the application configuration file and assigns it to the specified variable.
static void GetAppSetting (string key, ref bool value, out bool assigned)
 Reads a boolean value from the application configuration file and assigns it to the specified variable. Numerical representation is allowed (0 for false, non-zero for true)
static void GetAppSetting (string key, ref bool value, out bool assigned, bool otherformatsallowed)
 Reads a boolean value from the application configuration file and assigns it to the specified variable.
static void GetAppSetting (string key, ref ReportLevel value, out bool assigned)
 Reads an integer value from the application configuration file and assigns it to the specified variable.
static bool DoLaunch (ReportType reptype, ReportLevel replevel)
 Returns true if the report of a given type will be launched at the given reporting level, and false if not.
static EventLogEntryType ReportType2EventLogEntryType (ReportType rt)
 Returns the System.Diagnostics.EventLogEntryType value corresponding to the given ReportType. Remark: FailureAudit and SuccessAudit can not be generated because they don't have representation in ReportType.
static ReportType EventLogEntryType2ReportType (EventLogEntryType el)
 Returns the ReportType value corresponding to the given System.Diagnostics.EventLogEntryType. Remark: FailureAudit and SuccessAudit do not have representation in ReportType and are mapped to Error and Warning, respectively.
static TraceLevel ReportLevel2TraceLevel (ReportLevel level)
 Returns the System.Diagnostics.TraceLevel value corresponding to the given ReportLevel.
static ReportLevel TraceLevel2ReportLevel (TraceLevel tl)
 Returns the ReportLevel value corresponding to the given System.Diagnostics.TraceLevel.
static string FormatLogMsgDefault (int depth, int initialindent, int indentincrement, char indentchar, ReportType type, string location, string message, ReportSource source)
 Formats a one-line message for tracing output.
static string FormatTraceMsgDefault (int depth, int initialindent, int indentincrement, char indentchar, ReportType type, string location, string message, ReportSource source)
 Formats a one-line message for tracing output.
static string DefaultReportStringMessageBox (ReporterBase reporter, ReportType messagetype, string errorlocation, string errormessage)
 Auxiliary method that composes the complete message, including decoration, for reports launched in a message box.
static string DefaultReportStringConsole (ReporterBase reporter, ReportType messagetype, string errorlocation, string errormessage)
 Auxiliary method that composes the complete message, including decoration, for reports launched in consoles.
static string DefaultReportStringConsoleTimeStamp (ReporterBase reporter, ReportType messagetype, string errorlocation, string errormessage)
 Auxiliary method that composes the complete message, including decoration with a TIMESTAMP, for reports launched in consoles.
static string DefaultReportStringConsoleBas (ReporterBase reporter, ReportType messagetype, string errorlocation, string errormessage, bool timestamp)
 Base method for DefaultReportStringConsole and DefaultReportStringConsoleTimeStamp.
static void DefaultReportConsole (ReporterBase reporter, ReportType messagetype, string errorlocation, string errormessage)
 Default delegate for reporting. For parameter descriptions, see ReportDlg.
static string DefaultLocationString (ReporterBase reporter, ReportType messagetype, string location, Exception ex)
 Default delegate for assembly of the location string when reporting on consoles. For parameter descriptions, see ReportMessageDlg.
static string DefaultMessageString (ReporterBase reporter, ReportType messagetype, string basicmessage, Exception ex)
 Default delegate for message assembly of the message string when reporting on consoles. For parameter descriptions, see ReportMessageDlg.
static string DefaultReserveReportMessage (ReporterBase reporter, ReportType messagetype, string location, string message, Exception ex, Exception ex1)
 Default function function for assembling reserve error reporting message. This is put outside the DefaultReserveReportError() method such that the same assembly method can be used in different systems. The method is considered bulletproof.
Parameters:
messagetypeLevel of the message (Error, Warning,Info, etc.)
locationLocation string as passed to the error reporting function that has thrown an exception.
messageError message string as passed to the error reporting function that has thrown an exception.
exOriginal exception that was being reported when the error reporting function threw an exception.
ex1Exception thrown by the error reporting function.

static void DefaultReserveReportError (ReporterBase reporter, ReportType messagetype, string location, string message, Exception ex, Exception ex1)
 Default function function for reserve error reporting (called if an exception is thrown in a reporting function). Writes a report to the application's standard console (if defined) and Reporter's text writers and loggers (when defined). Writing is unconditional (e.g., even if reporter.UseTextWriter = false or reporter.ReportingLevel = Off, a message is written to the TextWriter's output streams).
static string ErrorLocationString0 (Exception ex)
 Returns location string derived from ex, which includes information about the location where error occurred, specified by the source file name, function and line and column numbers.
static string ErrorLocationString0 (string location, Exception ex)
 Returns Error location string derived from ex, which includes information about location of error occurrence and is prepended by additional location information (such as class name)

Public Attributes

ReportDelegate ReportDlg = null
 Delegate that performs error reporting. 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 ReportLocationDlg = null
 Delegate that assembles the error location string.
ReportMessageDelegate ReportMessageDlg = null
 Delegate that assembles the eror message string.
ReserveReportErrorDelegate ReserveReportErrorDlg = null
 Delegate that reports an error when the error reporting function throws an exception. Functions assigned to this delegate should really be BULLETPROOF. If not assigned then the internal method of the corresponding class is called. It is highly recommended to do reporting in small steps enclosed in try/catch blocks and especially to use the error reporting object very carefully (because it may not be initialized properly, which can also be the reason that the error reporting function crashes). It is higly recommended to first call the DefaultReserveReportError() within the function assigned to this delegate, or at least to use the DefaultReserveReportMessage() method for assembly of the message shown.
bool DebugMode = false
 Indicates that reporting suitable for debugging mode should be performed. A standard flag that can be used by the delegate functions.
ReportDelegate ReportDlgTextWriter = new ReportDelegate(DefaultReport_TextWriter)
 Delegate that performs reporting (actually logging) via text writer.
ReportLocationDelegate ReportLocationDlgTextWriter = new ReportLocationDelegate(DefaultReportLocation_TextWriter)
 Delegate that assembles the location string for reporting via TextWriter.
ReportMessageDelegate ReportMessageDlgTextWriter = new ReportMessageDelegate(DefaultReportMessage_TextWriter)
 Delegate that assembles the message string for reporting via text writer.
ReportDelegate ReportDlgTextLogger = new ReportDelegate(DefaultReport_TextLogger)
 Delegate that performs reporting (actually logging) via text writer.
ReportLocationDelegate ReportLocationDlgTextLogger = new ReportLocationDelegate(DefaultReportLocation_TextLogger)
 Delegate that assembles the location string for reporting via text logger.
ReportMessageDelegate ReportMessageDlgTextLogger = new ReportMessageDelegate(DefaultReportMessage_TextLogger)
 Delegate that assembles the message string for reporting via text writer.
ReportSource MsgSource = ReportSource.Unknown
 Indicates the source of the message (such as client, server, web service, etc.)
ReportDelegate ReportDlgTrace = new ReportDelegate(DefaultReport_Trace)
 Delegate that performs reporting (logging) via Pado trace mechanism. 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 ReportLocationDlgTrace = new ReportLocationDelegate(DefaultReportLocation_Trace)
 Delegate that assembles the error location string for reporting (logging) via Pado trace mechanism.
ReportMessageDelegate ReportMessageDlgTrace = new ReportMessageDelegate(DefaultReportMessage_Trace)
 Delegate that assembles the eror message string for reporting (logging) via Pado trace mechanism.

Static Public Attributes

static bool ReadGlobalAppSettings = true
 Indicates whether a global Reporter (or its derived class) should read settings from the application configuration file when initialized (default is true).

Protected Member Functions

virtual void SetDefaultReportDlg ()
 Sets the error reporting delegate to the default value.
virtual void SetDefaultReportLocationDlg ()
 Sets the error location assembling delegate to the default value. This default delegate does not utilize the auxiliary object (and can be mixed with the delegates that do.)
virtual void SetDefaultReportMessageDlg ()
 Sets the error message assembling delegate to the default value. This default delegate does not utilize the auxiliary object (and can be mixed with the delegates that do.)
virtual void SetDefaultReserveReportErrorDlg ()
 Sets the reserve error reporting delegate to the default value.
virtual void InitBegin ()
 Initial part of initialization. Auxiliary object is not affected because default delegates do not utilize it.
virtual void InitEnd ()
 Finalizing part of initialization. Auxiliary object is not affected because default delegates do not utilize it.
virtual void Dispose (bool disposing)
void GetAppSetting (string reportername, string keyroot, ref string value, out bool assigned)
 Reads a string value from the application configuration file (e.g. app.config) and assigns it to the specified parameter of the reporter.
void GetAppSetting (string reportername, string keyroot, ref char value, out bool assigned)
 Reads a character value from the application configuration file (e.g. app.config) and assigns it to the specified parameter of the reporter.
void GetAppSetting (string reportername, string keyroot, ref List< char > value, out bool assigned)
 Reads a list of characters from the application configuration file (e.g. app.config) and assigns it to the specified parameter of the reporter.
void GetAppSetting (string reportername, string keyroot, ref int value, out bool assigned)
 Reads an integer value from the application configuration file (e.g. app.config) and assigns it to the specified parameter of the reporter.
void GetAppSetting (string reportername, string keyroot, ref double value, out bool assigned)
 Reads a numeric value from the application configuration file (e.g. app.config) and assigns it to the specified parameter of the reporter.
void GetAppSetting (string reportername, string keyroot, ref bool value, out bool assigned)
 Reads a boolean value from the application configuration file (e.g. app.config) and assigns it to the specified parameter of the reporter.
void GetAppSetting (string reportername, string keyroot, ref ReportLevel value, out bool assigned)
 Reads a ReportLevel enumeration value from the application configuration file (e.g. app.config) and assigns it to the specified parameter of the reporter.
void AppSettingsReadWarning (string groupname)
 Launches an internal warning that the configuration settings belonging tot he specified group have already been read for this reporter. The warning is launched only if the settings have actually been read and if warnings of this type are switched on.
void MarkAppSettingsRead (string groupname)
 Marks a specified group of settings as been read for the current reporter.
virtual void ReadAppSettingsBasic (string groupname)
 Reads settings for a specified named group of reporters from the application configuration file. In the derived classes, this method should be overridden by the method that calls the base class' method.
void SyncReportLevelWithTraceSwitch (TraceSwitch tswitch, ref ReportLevel level)
 Synchronizes the value of ReportLevel enumeration variable with the state of a TraceSwitch variable. Enumeration is synchronized according to the Level property of the switch.
void SyncTraceSwitchWithReportLevel (ReportLevel level, TraceSwitch tswitch)
 Synchronizes the state of a TraceSwitch object with the value of the ReportLevel enumeration.
virtual void ReserveReportErrorSpecific (ReportType messagetype, string location, string message, Exception ex, Exception ex1)
 Reportinf of internal reporter errors for the specific reporter class (overridden in derived classes). This method is called for internal error reports when the delegate for this job is not defined.
void ReserveReportError (ReportType messagetype, string location, string message, Exception ex, Exception ex1)
 Used to report internal errors of the reporter. Designed to be bullet proof in order to ensure that improper behavior of the reporting system does not remain unnoticed.
virtual void PrintIntro (TextWriter tw, string introtext, string programname)
 Writes to a textwriter the introduction text that is usually printed before logging starts.
bool SetTW (ref TextWriter tw, ref bool disptw, 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 SetTW (ref TextWriter tw, ref bool disptw, 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 AddTW (ref List< TWClass > lwriters, TextWriter writer, bool writeintro, bool disposewriter)
 Adds another TextWriter to which reporting will also be performed.
bool AddTW (ref List< TWClass > lwriters, Stream stream, bool writeintro, bool disposewriter)
 Creates a TextWriter from the stream and adds it to the list of TextWriters on which reporting is also performed. Overrides the writeintro property by the 'writeintro' argument.
bool AddTW (ref List< TWClass > lwriters, string filename, bool append, bool writeintro, bool disposewriter)
 Creates a TextWriter from a specific file and adds it to the list of TextWriters on 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.
bool RemoveTW (List< TWClass > lwriters, TextWriter writer)
 Removes the first object from a list that contains the specified TextWriter.
bool RemoveTW (List< TWClass > lwriters, Stream stream)
 Removes the first object from a list whose TextWriter has been created form the specified stream.
bool RemoveTW (List< TWClass > lwriters, string filename)
 Removes the first object from a list whose TextWriter has been created form the file with the specified name.
virtual void TextWriterPrintIntro (TextWriter tw)
 Writes to a textwriter the introduction text that is usually printed before logging starts.
virtual void Report_TextWriter (ReportType messagetype, string location, string message, Exception ex)
 Launches a report via text writers. 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.
virtual void TextLoggerPrintIntro (TextWriter tw)
 Writes to a textwriter the introduction text that is usually printed before logging starts.
virtual void Report_TextLogger (ReportType messagetype, string location, string message, Exception ex)
 Launches a report via text logger. 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.
virtual void Report_Trace (ReportType messagetype, string location, string message, Exception ex)
 Launches a report via Trace. 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 string FullKey (string reportername, string keyroot)
 Returns a full keyroot of a specific configuration item with a reporter name specified.
static void DefaultReport_TextWriter (ReporterBase reporter, ReportType messagetype, string location, string message)
 Default delegate for launching reports (actually logging reports) via text writer.
static string DefaultReportLocation_TextWriter (ReporterBase reporter, ReportType messagetype, string location, Exception ex)
 Delegate for assembling a location string for this kind of report.
static string DefaultReportMessage_TextWriter (ReporterBase reporter, ReportType messagetype, string basicmessage, Exception ex)
 Delegate for assembling a report message for this kind of report.
static void DefaultReport_TextLogger (ReporterBase reporter, ReportType messagetype, string location, string message)
 Default delegate for launching reports (actually logging reports) via text writer.
static string DefaultReportLocation_TextLogger (ReporterBase reporter, ReportType messagetype, string location, Exception ex)
 Delegate for assembling a location string for this kind of report.
static string DefaultReportMessage_TextLogger (ReporterBase reporter, ReportType messagetype, string basicmessage, Exception ex)
 Delegate for assembling a report message for this kind of report.
static void DefaultReport_Trace (ReporterBase reporter, ReportType messagetype, string location, string message)
 Delegat for launching a report via Trace.
static string DefaultReportLocation_Trace (ReporterBase reporter, ReportType messagetype, string location, Exception ex)
 Delegate for assembling a location string for this kind of report.
static string DefaultReportMessage_Trace (ReporterBase reporter, ReportType messagetype, string basicmessage, Exception ex)
 Delegate for assembling a report message for this kind of report.

Protected Attributes

const string KeyPrefix = "ReporterMsg"
const string KeyLevelOn = "LevelOn"
TraceSwitch _ReportingSwitch = null
object _lockobj = new Object()

Properties

static bool GlobalInitialized [get]
 Gets the value indicating whether the global reporter of this class has already been initialized.
static ReporterBase Global [get, set]
 Gets the global reporter object. This is typically used for configuring the global reporter.
bool AppSettingsWarnings [get, set]
 Gets or sets the flag that specifies whether a warning message is launched when reading of application settings is attempted more than once for the same named group of settings.
bool IsGlobal [get, set]
 Indicates whether the current reporter is used as a global reporter or not.
int Depth [get, set]
 Gets or sets the current indentation level for on-line output. This should normally be done by calling IncreaseDepth() or DecreaseDepth().
int TextLoggerIndentInitial [get, set]
 Gets or sets number fo initial indentation charactyers.
int TextLoggerIndentSpacing [get, set]
 Gets or sets the number of indentation characters written per indentation level.
char TextLoggerIndentCharacter [get, set]
 Gets or sets the indentation character.
ReportLevel ReportingLevel [get, set]
 Gets or sets level of output for reporting (console output, message boxes, etc.).
ReportLevel LoggingLevel [get, set]
 Gets or sets level of output for logging (writing to log files).
ReportLevel TracingLevel [get, set]
 Gets or sets trace level (for external trace systems).
bool TreatError [get]
 Returns a boolean value indicating whether errors are treated by the reporter in its current state.
bool TreatWarning [get]
 Returns a boolean value indicating whether warnings are treated by the reporter in its current state.
bool TreatInfo [get]
 Returns a boolean value indicating whether info messages are treated by the reporter in its current state.
bool TreatUndefined [get]
 Returns a boolean value indicating whether undefined messages with the lowest priority are treated by the reporter in its current state.
ReportLevel Level [get, set]
 Gets the level with the lowesst priority (out of reporting, logging and tracing level), or sets all levels to the assigned level.
virtual bool this [ReportLevel level] [get, set]
 Indexer that returns true if messages of a given level are treated by the reporter (either by the reporting, logging or tracing part, according to the corresponding level states), or false if not (i.e. if all the levels are set lover than the index). In the case of assignment, when true is assigned, all levels that are set lower than the are set to index. Assignment with false should be used only exteptionally; but in this case all levels that are set higher or equal than the index are set one level below.
TraceSwitch ReportingSwitch [get, set]
 Gets or sets the TraceSwitch that is synchronized with ReportingLevel. IMPORTANT: State of the object obtained by get accessor must not be changed unless the object is assigned back by the set accessor. If one wants that this TraceSwitch assumes values specified by the configuration file, a corresponding Traceswitch must be created and assigned to this property (otherwise the TraceSwitch will be synchronized with the ReportingLevel, which will override its settings).
TraceSwitch LoggingSwitch [get, set]
 Gets or sets the TraceSwitch that is synchronized with LoggingLevel. IMPORTANT: State of the object obtained by get accessor must not be changed unless the object is assigned back by the set accessor. If one wants that this TraceSwitch assumes values specified by the configuration file, a corresponding Traceswitch must be created and assigned to this property (otherwise the TraceSwitch will be synchronized with the LoggingLevel, which will override its settings).
TraceSwitch TracingSwitch [get, set]
 Gets or sets the TraceSwitch that is synchronized with TracingLevel. IMPORTANT: State of the object obtained by get accessor must not be changed unless the object is assigned back by the set accessor. If one wants that this TraceSwitch assumes values specified by the configuration file, a corresponding Traceswitch must be created and assigned to this property (otherwise the TraceSwitch will be synchronized with the TracingLevel, which will override its settings).
bool ThrowTestException [get, set]
 If true then the basic reporting function will throw an exception. This is intended predominantly for testing how the reporter behaves in case of internal errors. When the exception is thrown, the value is set back to false. If we want an exception to be thrown again then the value must be set to true once again.
object Obj [get, set]
 Auxiliary object used by the delegates that perform error reporting. The object is used to provide additional information used in error reporting, or to provide objects that perform some actions in error reporting tasks, or both. It is left entirely to error reporting delegates to interpret the object's contents.
virtual object lockobj [get]
 Object used for locking.
bool UseTextWriter [get, set]
 Gets or sets the flag specifying whether reporting using a text writer is performed or not.
bool TextWriterFlushing [get, set]
 Gets or sets the flag that tells whether or not the text writers are flushed after every message that is reported through them.
string TextWriterIntroText [get, set]
 Gets or sets the introduction string that is written before logging to a TextWriter begins. If this is not specified then the reporter composes its own introduction string, eventually using programname (when defined).
string TextWriterProgramName [get, set]
 String denoting the name of the program or other entity that uses the Reporter for logging. When introtext is not specified, this name is used in the introduction text composed by the reporter.
bool TextWriterWriteIntro [get, set]
 Specifies whether introduction text is written before logging of messages begins or not.
bool UseTextLogger [get, set]
 Gets or sets the flag specifying whether reporting using a text writer is performed or not.
bool TextLoggerFlushing [get, set]
 Gets or sets the flag that tells whether or not the text writers are flushed after every message that is reported through them.
string TextLoggerIntroText [get, set]
 Gets or sets the introduction string that is written before logging to a TextWriter begins. If this is not specified then the reporter composes its own introduction string, eventually using programname (when defined).
string TextLoggerProgramName [get, set]
 String denoting the name of the program or other entity that uses the Reporter for logging. When introtext is not specified, this name is used in the introduction text composed by the reporter.
bool TextLoggerWriteIntro [get, set]
 Specifies whether introduction text is written before logging of messages begins or not.
bool UseTrace [get, set]
 Gets or sets the flag specifying whether reporting using the pado trace is performed or not.

Private Member Functions

 ~ReporterBase ()
void SyncLevels ()
int FindTW (List< TWClass > lwriters, TextWriter writer)
 Returns the first object on the list that contains a specific TextWriter.
int FindTW (List< TWClass > lwriters, Stream stream)
 Returns the first object on the list whose TextWriter has been created from the specific Stream.
int FindTW (List< TWClass > lwriters, string filename)
 Returns the first object on the list whose TextWriter has been created from a file with the specific name.

Static Private Member Functions

static void Test ()

Private Attributes

bool isDisposed = false
bool dispLocked = false
List< String > readconf = null
bool _AppSettingsWarnings = true
const string KeyLevelOff = "LevelOff"
const string KeyReportingLevel = "ReportingLevel"
const string KeyLoggingLevel = "LoggingLevel"
const string KeyTracingLevel = "TracingLevel"
const string KeyUseTextWriter = "UseTextWriter"
const string KeyUseTextLogger = "UseTextLogger"
const string KeyUseTrace = "UseTrace"
const string KeyTextWriterAppend = "TextWriterAppend"
const string KeyTextWriterFile = "TextWriterFile"
const string KeyTextWriterFile1 = "TextWriterFile1"
const string KeyTextWriterWriteIntro = "TextWriterWriteIntro"
const string KeyTextWriterProgramName = "TextWriterProgramName"
const string KeyTextWriterIntroText = "TextWriterIntroText"
const string KeyTextLoggerAppend = "TextLoggerAppend"
const string KeyTextLoggerFile = "TextLoggerFile"
const string KeyTextLoggerFile1 = "TextLoggerFile1"
const string KeyTextLoggerWriteIntro = "TextLoggerWriteIntro"
const string KeyTextLoggerProgramName = "TextLoggerProgramName"
const string KeyTextLoggerIntroText = "TextLoggerIntroText"
const string KeyTextLoggerIndentInitial = "TextLoggerIndentInitial"
const string KeyTextLoggerIndentSpacing = "TextLoggerIndentSpacing"
const string KeyTextLoggerIndentCharacter = "TextLoggerIndentCharacter"
const string KeyAppSettingsWarnings = "AppSettingsWarnings"
bool TextWriterAppend = false
bool TextLoggerAppend = false
bool _IsGlobal = false
int _Depth = 0
int _IndentSpacing = 2
int _InitialIndent = 0
char _IndentCharacter = ' '
static int maxErrIndentLevel = 3
static int maxErrInitialIndent = 3
static int maxErrIndentSpacing = 3
const ReportLevel DefaultReportingLevel = ReportLevel.Warning
const ReportLevel DefaultLoggingLevel = ReportLevel.Warning
const ReportLevel DefaultTracingLevel = ReportLevel.Info
ReportLevel _ReportingLevel = DefaultReportingLevel
ReportLevel _LoggingLevel = DefaultLoggingLevel
ReportLevel _TracingLevel = DefaultTracingLevel
bool _TreatError
TraceSwitch _LoggingSwitch = null
TraceSwitch _TracingSwitch = null
bool _ThrowTestException = false
object _obj = null
bool _UseTextWriter = true
bool _TextWriterFlushing = false
TextWriter Writer = null
bool DisposeWriter = false
List< TWClassWriters = new List<TWClass>()
string _TextWriterIntroText = null
string _TextWriterProgramName = null
bool _TextWriterWriteIntro = true
bool _UseTextLogger = false
bool _TextLoggerFlushing = true
TextWriter Logger = null
bool DisposeLogger = false
List< TWClassLoggers = new List<TWClass>()
string _TextLoggerIntroText = null
string _TextLoggerProgramName = null
bool _TextLoggerWriteIntro = true
bool _UseTrace = false

Static Private Attributes

static ReporterBase _Global = null
static bool _GlobalInitialized = false
static object GlobalLock = new object()
static int numErrIndentLevel = 0
static int numErrInitialIndent = 0
static int numErrIndentSpacing = 0
static string _newLineReplacement = " ... "

Detailed Description

Base IGlib class for reporting, tracing and logging; provides a global reporter and a basis for creation of local reporters. This class is identical to the IGLib class (copied directly). IN EFA, refer to the derived class Reporter!


Constructor & Destructor Documentation

IG::Lib::ReporterBase::ReporterBase ( ) [inline]

Constructor. Initializes all error reporting delegates to default values and sets auxliary object to null. Auxiliary object Obj is set to null.

IG::Lib::ReporterBase::ReporterBase ( object  obj,
ReportDelegate  reportdelegate,
ReportLocationDelegate  locationdelegate,
ReportMessageDelegate  messagedelegate,
ReserveReportErrorDelegate  reservereportdelegate 
) [inline]

Constructor. Initializes the error reporter by the specified auxiliary object and delegates used to perform error reporting tasks. Delegates that are not specified are set to default values.

Parameters:
objAuxiliary object that will be passed to error reporting delegates when called in local methods.
reportdelegateDelegates that is called to launc an error report. Methods of this class will pass to this class the auxiliary object, location strings assembled by the location assembling delegate, and error message string assembled by the error message delegate.
locationdelegateDelegate that is called to assemble the error location string. The Auxiliary object this.Obj will be internally passed to this delegate any time it is called.
messagedelegateDelegate that is called to assemble the error message (without decorations). The Auxiliary object this.Obj will be internally passed to this delegate any time it is called.
reservereportdelegateDelegate that is called to report exceptions that occur within error reporting methods. In particular, this must ne as bullet proof as possible.
IG::Lib::ReporterBase::ReporterBase ( object  obj,
ReportDelegate  reportdelegate,
ReportLocationDelegate  locationdelegate,
ReportMessageDelegate  messagedelegate 
) [inline]

Constructor. Initializes the error reporter by the specified auxiliary object and delegates used to perform error reporting tasks. Reserve error reporting delegate is initialized to a default value. Delegates that are not specified are set to default values.

IG::Lib::ReporterBase::ReporterBase ( object  obj,
ReportDelegate  reportdelegate 
) [inline]

Constructor. Initializes the error reporter by the specified auxiliary object and the delegate to perform error reporting tasks. Reserve error reporting delegate is initialized to a default value. Delegates for assembling the error location string and error message string are set to their default values, which are adapted to console-like eror reporting systems.

IG::Lib::ReporterBase::ReporterBase ( object  obj,
ReportDelegate  reportdelegate,
ReserveReportErrorDelegate  reservereportdelegate 
) [inline]

Constructor. Initializes the error reporter by the specified auxiliary object and delegates used to perform error reporting tasks. Delegates for assembling the error locatin and error message string are set to their default values, which are adapted to console-like eror reporting systems.

Parameters:
objAuxiliary object that will be passed to error reporting delegates when called in local methods.
reportdelegateDelegates that is called to launc an error report. Methods of this class will pass to this class the auxiliary object, location strings assembled by the location assembling delegate, and error message string assembled by the error message delegate.
reservereportdelegateDelegate that is called to report exceptions that occur within error reporting methods. In particular, this must ne as bullet proof as possible.
IG::Lib::ReporterBase::~ReporterBase ( ) [inline, private]

Member Function Documentation

virtual void IG::Lib::ReporterBase::SetDefaultReportDlg ( ) [inline, protected, virtual]

Sets the error reporting delegate to the default value.

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

virtual void IG::Lib::ReporterBase::SetDefaultReportLocationDlg ( ) [inline, protected, virtual]

Sets the error location assembling delegate to the default value. This default delegate does not utilize the auxiliary object (and can be mixed with the delegates that do.)

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

virtual void IG::Lib::ReporterBase::SetDefaultReportMessageDlg ( ) [inline, protected, virtual]

Sets the error message assembling delegate to the default value. This default delegate does not utilize the auxiliary object (and can be mixed with the delegates that do.)

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

virtual void IG::Lib::ReporterBase::SetDefaultReserveReportErrorDlg ( ) [inline, protected, virtual]

Sets the reserve error reporting delegate to the default value.

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

virtual void IG::Lib::ReporterBase::InitBegin ( ) [inline, protected, virtual]

Initial part of initialization. Auxiliary object is not affected because default delegates do not utilize it.

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

virtual void IG::Lib::ReporterBase::InitEnd ( ) [inline, protected, virtual]

Finalizing part of initialization. Auxiliary object is not affected because default delegates do not utilize it.

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

void IG::Lib::ReporterBase::Init ( object  obj,
ReportDelegate  reportdelegate,
ReportLocationDelegate  locationdelegate,
ReportMessageDelegate  messagedelegate,
ReserveReportErrorDelegate  reservereportdelegate 
) [inline]

Initializes the error reporter by the specified auxiliary object and delegates used to perform error reporting tasks. Delegates that are not specified are set to default values.

Parameters:
objAuxiliary object that will be passed to error reporting delegates when called in local methods.
reportdelegateDelegates that is called to launc an error report. Methods of this class will pass to this class the auxiliary object, location strings assembled by the location assembling delegate, and error message string assembled by the error message delegate.
locationdelegateDelegate that is called to assemble the error location string. The Auxiliary object this.Obj will be internally passed to this delegate any time it is called.
messagedelegateDelegate that is called to assemble the error message (without decorations). The Auxiliary object this.Obj will be internally passed to this delegate any time it is called.
reservereportdelegateDelegate that is called to report exceptions that occur within error reporting methods. In particular, this must ne as bullet proof as possible.

Implements IG::Lib::IReporterBase.

void IG::Lib::ReporterBase::Init ( ) [inline]

Initializes all error reporting delegates to default values and sets auxliary object to null. Auxiliary object Obj is set to null.

Implements IG::Lib::IReporterBase.

void IG::Lib::ReporterBase::Init ( object  obj,
ReportDelegate  reportdelegate,
ReportLocationDelegate  locationdelegate,
ReportMessageDelegate  messagedelegate 
) [inline]

Initializes the error reporter by the specified auxiliary object and delegates used to perform error reporting tasks. Reserve error reporting delegate is initialized to a default value. Delegates that are not specified are set to default values.

Implements IG::Lib::IReporterBase.

void IG::Lib::ReporterBase::Init ( object  obj,
ReportDelegate  reportdelegate 
) [inline]

Initializes the error reporter by the specified auxiliary object and the delegate to perform error reporting tasks. Reserve error reporting delegate is initialized to a default value. Delegates for assembling the error location string and error message string are set to their default values, which are adapted to console-like eror reporting systems.

Implements IG::Lib::IReporterBase.

void IG::Lib::ReporterBase::Init ( object  obj,
ReportDelegate  reportdelegate,
ReserveReportErrorDelegate  reservereportdelegate 
) [inline]

Initializes the error reporter by the specified auxiliary object and delegates used to perform error reporting tasks. Delegates for assembling the error locatin and error message string are set to their default values, which are adapted to console-like eror reporting systems.

Parameters:
objAuxiliary object that will be passed to error reporting delegates when called in local methods.
reportdelegateDelegates that is called to launc an error report. Methods of this class will pass to this class the auxiliary object, location strings assembled by the location assembling delegate, and error message string assembled by the error message delegate.
reservereportdelegateDelegate that is called to report exceptions that occur within error reporting methods. In particular, this must ne as bullet proof as possible.

Implements IG::Lib::IReporterBase.

void IG::Lib::ReporterBase::Dispose ( ) [inline]
virtual void IG::Lib::ReporterBase::Dispose ( bool  disposing) [inline, protected, virtual]
static Exception IG::Lib::ReporterBase::ReviseException ( Exception  ex,
string  messageaddition,
Type  newtype,
bool  sametype,
bool  keepmessage,
bool  oldasinner 
) [inline, static]

Takes an existing exception and returns a modified exception based on it.

Parameters:
exException whose revised version is created.
messageadditionString that is prepended to the old message (when keepmessage is true) or forms the new message of the exception (when keepmessage is false)
newtypeThe type of the new exception. Applies when sametype is false and the specified type is valid, i.e. represents Exception or a derived type. Also applies when ex is null and the specified type is valid.
sametypeIf true then the an exception of the same type as the original one is created.
keepmessageIf true then the original message is contained in the revised exception (it is simply appended to messageaddition )
oldasinnerIf true then the original exception is included as inner exception.
Returns:
The revised exception (the original exception modified according to parameters).
static Exception IG::Lib::ReporterBase::ReviseException ( Exception  ex,
string  messageaddition 
) [inline, static]

Takes an existing exception and returns a modified exception based on it. The returned exception is of the same type as the original one. Original message is appended to messageaddition . The created exception does not have an inner exception.

Parameters:
exException whose revised version is created.
messageadditionString that is prepended to the old message.
static Exception IG::Lib::ReporterBase::ReviseException ( Exception  ex,
string  messageaddition,
bool  keepmessage 
) [inline, static]

Takes an existing exception and returns a modified exception based on it. The returned exception is of the same type as the original one. The created exception does not have an inner exception.

Parameters:
exException whose revised version is created.
messageadditionString that is prepended to the old message (when keepmessage is true) or forms the new message of the exception (when keepmessage is false)
keepmessageIf false then the original message is not kept.
static Exception IG::Lib::ReporterBase::ReviseException ( Exception  ex,
string  messageaddition,
bool  keepmessage,
bool  oldasinner 
) [inline, static]

Takes an existing exception and returns a modified exception based on it. The returned exception is of the same type as the original one.

Parameters:
exException whose revised version is created.
messageadditionString that is prepended to the old message (when keepmessage is true) or forms the new message of the exception (when keepmessage is false)
keepmessageIf false then the original message is not kept.
oldasinnerIf true then the original original exception becomes the inner exception of the returned one.
static Exception IG::Lib::ReporterBase::ReviseException ( Exception  ex,
string  messageaddition,
Type  newtype 
) [inline, static]

Takes an existing exception and returns a modified exception based on it. Original message is appended to messageaddition . The created exception does not have an inner exception.

Parameters:
exException whose revised version is created.
messageadditionString that is prepended to the old message (when keepmessage is true) or forms the new message of the exception (when keepmessage is false)
newtypeType of the returned exception. If the parameter is null then the type will be Exception.
static Exception IG::Lib::ReporterBase::ReviseException ( Exception  ex,
string  messageaddition,
Type  newtype,
bool  keepmessage 
) [inline, static]

Takes an existing exception and returns a modified exception based on it. The created exception does not have an inner exception.

Parameters:
exException whose revised version is created.
messageadditionString that is prepended to the old message (when keepmessage is true) or forms the new message of the exception (when keepmessage is false)
newtypeType of the returned exception. If the parameter is null then the type will be Exception.
keepmessageIf false then the original message is not kept.
static Exception IG::Lib::ReporterBase::ReviseException ( Exception  ex,
string  messageaddition,
Type  newtype,
bool  keepmessage,
bool  oldasinner 
) [inline, static]

Takes an existing exception and returns a modified exception based on it.

Parameters:
exException whose revised version is created.
messageadditionString that is prepended to the old message (when keepmessage is true) or forms the new message of the exception (when keepmessage is false)
newtypeType of the returned exception. If the parameter is null then the type will be Exception.
keepmessageIf false then the original message is not kept.
oldasinnerIf true then the original original exception becomes the inner exception of the returned one.
static void IG::Lib::ReporterBase::GetAppSetting ( string  key,
ref string  value,
out bool  assigned 
) [inline, static]

Reads a string value from the application configuration file (e.g. app.config) and assigns it to the specified variable.

Parameters:
keyKey in the application configuration file.
valueReference to the variable to which the read-in value is assigned.
assignedOutput parameter that indicates whether the value has been assigned or not.
static void IG::Lib::ReporterBase::GetAppSetting ( string  key,
ref char  value,
out bool  assigned 
) [inline, static]

Reads a character value from the application configuration file and assigns it to the specified variable.

Parameters:
keyKey in the application configuration file.
valueReference to the variable to which the read-in value is assigned.
assignedOutput parameter that indicates whether the value has been assigned or not.
Exceptions:
T:System.FormatExceptionThrown when value is not in the right format.
static void IG::Lib::ReporterBase::GetAppSetting ( string  key,
ref List< char >  value,
out bool  assigned 
) [inline, static]

Reads a list of characters from the application configuration file and assigns it to the specified variable.

Parameters:
keyKey in the application configuration file.
valueReference to the variable to which the read-in value is assigned.
assignedOutput parameter that indicates whether the value has been assigned or not.
Exceptions:
T:System.FormatExceptionThrown when value is not in the right format.
static void IG::Lib::ReporterBase::GetAppSetting ( string  key,
ref int  value,
out bool  assigned 
) [inline, static]

Reads an integer value from the application configuration file and assigns it to the specified variable.

Parameters:
keyKey in the application configuration file.
valueReference to the variable to which the read-in value is assigned.
assignedOutput parameter that indicates whether the value has been assigned or not.
Exceptions:
T:System.FormatExceptionThrown when value is not in the right format.
T:System.OverFlowException
static void IG::Lib::ReporterBase::GetAppSetting ( string  key,
ref double  value,
out bool  assigned 
) [inline, static]

Reads a floating point value from the application configuration file and assigns it to the specified variable.

Parameters:
keyKey in the application configuration file.
valueReference to the variable to which the read-in value is assigned.
assignedOutput parameter that indicates whether the value has been assigned or not.
Exceptions:
T:System.FormatExceptionThrown when value is not in the right format.
T:System.OverFlowException
static void IG::Lib::ReporterBase::GetAppSetting ( string  key,
ref bool  value,
out bool  assigned 
) [inline, static]

Reads a boolean value from the application configuration file and assigns it to the specified variable. Numerical representation is allowed (0 for false, non-zero for true)

Parameters:
keyKey in the application configuration file.
valueReference to the variable to which the read-in value is assigned.
assignedOutput parameter that indicates whether the value has been assigned or not.
Exceptions:
T:System.FormatExceptionThrown when value is not in the right format.
static void IG::Lib::ReporterBase::GetAppSetting ( string  key,
ref bool  value,
out bool  assigned,
bool  otherformatsallowed 
) [inline, static]

Reads a boolean value from the application configuration file and assigns it to the specified variable.

Parameters:
keyKey in the application configuration file.
valueReference to the variable to which the read-in value is assigned.
assignedOutput parameter that indicates whether the value has been assigned or not.
otherformatsallowedIf true then boolean type can be specified as number - 0 for false and non-zero for true.
Exceptions:
T:System.FormatExceptionThrown when value is not in the right format.
static void IG::Lib::ReporterBase::GetAppSetting ( string  key,
ref ReportLevel  value,
out bool  assigned 
) [inline, static]

Reads an integer value from the application configuration file and assigns it to the specified variable.

Parameters:
keyKey in the application configuration file.
valueReference to the variable to which the read-in value is assigned.
assignedOutput parameter that indicates whether the value has been assigned or not.
static string IG::Lib::ReporterBase::FullKey ( string  reportername,
string  keyroot 
) [inline, static, protected]

Returns a full keyroot of a specific configuration item with a reporter name specified.

Parameters:
groupnameUser - defined name of a reporter where settings are set. If null then the key will apply to all reporters.
keyrootReduced keyroot name (without decorations).
Returns:
The composed as it appears in the application configuration file.
void IG::Lib::ReporterBase::GetAppSetting ( string  reportername,
string  keyroot,
ref string  value,
out bool  assigned 
) [inline, protected]

Reads a string value from the application configuration file (e.g. app.config) and assigns it to the specified parameter of the reporter.

Parameters:
groupnameA name that makes possible to apply different groups of settings to different reporters.
keyrootAgreed name of the parameter to be assigned.
valueReference to the variable to which the read-in value is assigned in the case that it is defined. If the given key is not defined in the configuration file then the variable is not affected.
assignedOutput parameter, tells whether the value has been assigned.
void IG::Lib::ReporterBase::GetAppSetting ( string  reportername,
string  keyroot,
ref char  value,
out bool  assigned 
) [inline, protected]

Reads a character value from the application configuration file (e.g. app.config) and assigns it to the specified parameter of the reporter.

Parameters:
groupnameA name that makes possible to apply different groups of settings to different reporters.
keyrootAgreed name of the parameter to be assigned.
valueReference to the variable to which the read-in value is assigned in the case that it is defined. If the given key is not defined in the configuration file then the variable is not affected.
assignedOutput parameter, tells whether the value has been assigned.
void IG::Lib::ReporterBase::GetAppSetting ( string  reportername,
string  keyroot,
ref List< char >  value,
out bool  assigned 
) [inline, protected]

Reads a list of characters from the application configuration file (e.g. app.config) and assigns it to the specified parameter of the reporter.

Parameters:
groupnameA name that makes possible to apply different groups of settings to different reporters.
keyrootAgreed name of the parameter to be assigned.
valueReference to the variable to which the read-in value is assigned in the case that it is defined. If the given key is not defined in the configuration file then the variable is not affected.
assignedOutput parameter, tells whether the value has been assigned.
void IG::Lib::ReporterBase::GetAppSetting ( string  reportername,
string  keyroot,
ref int  value,
out bool  assigned 
) [inline, protected]

Reads an integer value from the application configuration file (e.g. app.config) and assigns it to the specified parameter of the reporter.

Parameters:
groupnameA name that makes possible to apply different groups of settings to different reporters.
keyrootAgreed name of the parameter to be assigned.
valueReference to the variable to which the read-in value is assigned in the case that it is defined. If the given key is not defined in the configuration file then the variable is not affected.
assignedOutput parameter, tells whether the value has been assigned.
void IG::Lib::ReporterBase::GetAppSetting ( string  reportername,
string  keyroot,
ref double  value,
out bool  assigned 
) [inline, protected]

Reads a numeric value from the application configuration file (e.g. app.config) and assigns it to the specified parameter of the reporter.

Parameters:
groupnameA name that makes possible to apply different groups of settings to different reporters.
keyrootAgreed name of the parameter to be assigned.
valueReference to the variable to which the read-in value is assigned in the case that it is defined. If the given key is not defined in the configuration file then the variable is not affected.
assignedOutput parameter, tells whether the value has been assigned.
void IG::Lib::ReporterBase::GetAppSetting ( string  reportername,
string  keyroot,
ref bool  value,
out bool  assigned 
) [inline, protected]

Reads a boolean value from the application configuration file (e.g. app.config) and assigns it to the specified parameter of the reporter.

Parameters:
groupnameA name that makes possible to apply different groups of settings to different reporters.
keyrootAgreed name of the parameter to be assigned.
valueReference to the variable to which the read-in value is assigned in the case that it is defined. If the given key is not defined in the configuration file then the variable is not affected.
assignedOutput parameter, tells whether the value has been assigned.
void IG::Lib::ReporterBase::GetAppSetting ( string  reportername,
string  keyroot,
ref ReportLevel  value,
out bool  assigned 
) [inline, protected]

Reads a ReportLevel enumeration value from the application configuration file (e.g. app.config) and assigns it to the specified parameter of the reporter.

Parameters:
groupnameA name that makes possible to apply different groups of settings to different reporters.
keyrootAgreed name of the parameter to be assigned.
valueReference to the variable to which the read-in value is assigned in the case that it is defined. If the given key is not defined in the configuration file then the variable is not affected.
assignedOutput parameter, tells whether the value has been assigned.
bool IG::Lib::ReporterBase::AppSettingsRead ( string  groupname) [inline]

Returns a flag that tells whether configuration settings with a given group name have already been read for this reporter.

Parameters:
groupnameName of the settings group, null and "" are treated teh same (denoting the genraal group).
Returns:
true if settings with the specified name have already been read for teh current reporter, false otherwise.

Implements IG::Lib::IReporterBase.

bool IG::Lib::ReporterBase::AppSettingsRead ( ) [inline]

Returns a flag that tells whether general configuration settings (not belonging to any group) have already been read for this reporter.

Returns:
true if settings with the specified name have already been read for teh current reporter, false otherwise.

Implements IG::Lib::IReporterBase.

void IG::Lib::ReporterBase::AppSettingsReadWarning ( string  groupname) [inline, protected]

Launches an internal warning that the configuration settings belonging tot he specified group have already been read for this reporter. The warning is launched only if the settings have actually been read and if warnings of this type are switched on.

Parameters:
groupnameName of the settings group.
void IG::Lib::ReporterBase::MarkAppSettingsRead ( string  groupname) [inline, protected]

Marks a specified group of settings as been read for the current reporter.

Parameters:
groupnameName of the settings group, null and "" are treated teh same (denoting the genraal group).
virtual void IG::Lib::ReporterBase::ReadAppSettingsBasic ( string  groupname) [inline, protected, virtual]

Reads settings for a specified named group of reporters from the application configuration file. In the derived classes, this method should be overridden by the method that calls the base class' method.

Parameters:
groupnameName of the group of reporters for which the settings apply.

Locking and try blocks are not needed in this method because they appear in the calling methods.

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

void IG::Lib::ReporterBase::ReadAppSettings ( string  groupname,
bool  onlyonce 
) [inline]

Reads settings for a specified named group of reporters from the application configuration file.

Parameters:
groupnameName of the group of reporters for which the settings apply.
onlyonceIf true then settings belonging to the specified group are read only once.

Implements IG::Lib::IReporterBase.

void IG::Lib::ReporterBase::ReadAppSettings ( string  groupname) [inline]

Reads settings for a specified named group of reporters from the application configuration file.

Parameters:
groupnameName of the group of reporters for which the settings apply.

Implements IG::Lib::IReporterBase.

void IG::Lib::ReporterBase::ReadAppSettings ( ) [inline]

Reads common reporter settings (i.e. settings that are not assigned for any named group) from the application configuration file.

Implements IG::Lib::IReporterBase.

void IG::Lib::ReporterBase::IncreaseDepth ( ) [inline]

Increases indentation level by 1.

Returns:
Current indentation level.

Implements IG::Lib::IReporterBase.

void IG::Lib::ReporterBase::IncreaseDepth ( int  numlevels) [inline]

Increases indentation level by the specified number of levels (can be 0 or negative).

Parameters:
numlevelsNumber of levels by which indentation is increased.
Returns:
Current intentation level.

Implements IG::Lib::IReporterBase.

void IG::Lib::ReporterBase::DecreaseDepth ( ) [inline]

Decreases indentation level by 1.

Returns:
Current indentation level.

Implements IG::Lib::IReporterBase.

void IG::Lib::ReporterBase::DecreaseDepth ( int  numlevels) [inline]

Decreases indentation level by the specified number of levels (can be 0 or negative).

Parameters:
numlevelsNumber of levels by which indentation is decreased.
Returns:
Current intentation level.

Implements IG::Lib::IReporterBase.

void IG::Lib::ReporterBase::SyncLevels ( ) [inline, private]
void IG::Lib::ReporterBase::ResetLevels ( ) [inline]

Resets the various kinds of reporting levels to default values.

Implements IG::Lib::IReporterBase.

static bool IG::Lib::ReporterBase::DoLaunch ( ReportType  reptype,
ReportLevel  replevel 
) [inline, static]

Returns true if the report of a given type will be launched at the given reporting level, and false if not.

Parameters:
reptypeType of the report for which information is returned.
replevelTrue if reports of the specific type are launched, false if not.
bool IG::Lib::ReporterBase::DoReporting ( ReportType  reptype) [inline]

Returns true if the report of a given type should be shown by user interface (according to ReportingLevel), and false if not.

Parameters:
reptypeType of the report for which information is returned.
Returns:
True if reports of the specific type are launched, false if not.

Implements IG::Lib::IReporterBase.

bool IG::Lib::ReporterBase::DoLogging ( ReportType  reptype) [inline]

Returns true if the report of a given type should be logged in log files (according to ReportingLevel), and false if not.

Parameters:
reptypeType of the report for which information is returned.
Returns:
True if reports of the specific type are launched, false if not.

Implements IG::Lib::IReporterBase.

bool IG::Lib::ReporterBase::DoTracing ( ReportType  reptype) [inline]

Returns true if the report of a given type should traced (according to ReportingLevel), and false if not.

Parameters:
reptypeType of the report for which information is returned.
Returns:
True if reports of the specific type are launched, false if not.

Implements IG::Lib::IReporterBase.

static EventLogEntryType IG::Lib::ReporterBase::ReportType2EventLogEntryType ( ReportType  rt) [inline, static]

Returns the System.Diagnostics.EventLogEntryType value corresponding to the given ReportType. Remark: FailureAudit and SuccessAudit can not be generated because they don't have representation in ReportType.

Parameters:
levelReportType value to be converted.
Returns:
Converted value of type EventLogEntryType.
static ReportType IG::Lib::ReporterBase::EventLogEntryType2ReportType ( EventLogEntryType  el) [inline, static]

Returns the ReportType value corresponding to the given System.Diagnostics.EventLogEntryType. Remark: FailureAudit and SuccessAudit do not have representation in ReportType and are mapped to Error and Warning, respectively.

Parameters:
levelEventLogEntryType value to be converted.
Returns:
Converted value of type ReportType.
static TraceLevel IG::Lib::ReporterBase::ReportLevel2TraceLevel ( ReportLevel  level) [inline, static]

Returns the System.Diagnostics.TraceLevel value corresponding to the given ReportLevel.

Parameters:
levelReportLevel value to be converted.
Returns:
Converted value of type TraceLevel.
static ReportLevel IG::Lib::ReporterBase::TraceLevel2ReportLevel ( TraceLevel  tl) [inline, static]

Returns the ReportLevel value corresponding to the given System.Diagnostics.TraceLevel.

Parameters:
levelTraceLevel value to be converted.
Returns:
Converted value of type ReportLevel.
void IG::Lib::ReporterBase::SyncReportLevelWithTraceSwitch ( TraceSwitch  tswitch,
ref ReportLevel  level 
) [inline, protected]

Synchronizes the value of ReportLevel enumeration variable with the state of a TraceSwitch variable. Enumeration is synchronized according to the Level property of the switch.

Parameters:
tswitchA trace switch that the ReportLevel enumeration variable will be synchronized with. If it is null or it contains a level that can not be represented by the ReportLevel enumeration then nothing happens.
levelThe ReportLevel variable that is synchronized; declared as ref
void IG::Lib::ReporterBase::SyncTraceSwitchWithReportLevel ( ReportLevel  level,
TraceSwitch  tswitch 
) [inline, protected]

Synchronizes the state of a TraceSwitch object with the value of the ReportLevel enumeration.

Parameters:
levelValue of the ReportLevel enumeration that TraceSwitch will be synchronized with
tswitchTraceSwitch taht is synchronized.
virtual void IG::Lib::ReporterBase::ReserveReportErrorSpecific ( ReportType  messagetype,
string  location,
string  message,
Exception  ex,
Exception  ex1 
) [inline, protected, virtual]

Reportinf of internal reporter errors for the specific reporter class (overridden in derived classes). This method is called for internal error reports when the delegate for this job is not defined.

Parameters:
messagetype
location
message
ex
ex1

Reimplemented in IG::Forms::ReporterForms, and IG::Forms::ReporterConsoleMsgbox_Base.

void IG::Lib::ReporterBase::ReserveReportError ( ReportType  messagetype,
string  location,
string  message,
Exception  ex,
Exception  ex1 
) [inline, protected]

Used to report internal errors of the reporter. Designed to be bullet proof in order to ensure that improper behavior of the reporting system does not remain unnoticed.

Parameters:
messagetype
location
message
ex
ex1
virtual void IG::Lib::ReporterBase::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.

Implements IG::Lib::IReporterBase.

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

void IG::Lib::ReporterBase::Report ( ReportType  messagetype,
string  message,
Exception  ex 
) [inline]

Launches a report. Predominantly for error and warning reports.

Parameters:
messagetypeLevel of the message (Error, Warnind, etc.).
messageUser-provided description of error.
exException that is the cause for launching the report (and from which additional information is extracted).

Implements IG::Lib::IReporterBase.

void IG::Lib::ReporterBase::Report ( ReportType  messagetype,
Exception  ex,
string  location 
) [inline]

Launches a report. Predominantly for error and warning reports.

Parameters:
messagetypeLevel of the message (Error, Warnind, etc.).
exException that is the cause for launching the report (and from which additional information is extracted).
locationUser-provided description of error location.

Implements IG::Lib::IReporterBase.

void IG::Lib::ReporterBase::Report ( ReportType  messagetype,
Exception  ex 
) [inline]

Launches a report. Predominantly for error and warning reports.

Parameters:
messagetypeLevel of the message (Error, Warnind, etc.).
exException that is the cause for launching the report (and from which additional information is extracted).

Implements IG::Lib::IReporterBase.

void IG::Lib::ReporterBase::Report ( ReportType  messagetype,
string  location,
string  message 
) [inline]

Launches a report.

Parameters:
messagetypeLevel of the message (Error, Warnind, etc.).
locationUser provided description of the location where report was triggered.
messageUser provided message included in the report.

Implements IG::Lib::IReporterBase.

void IG::Lib::ReporterBase::Report ( ReportType  messagetype,
string  message 
) [inline]

Launches a report.

Parameters:
messagetypeLevel of the message (Error, Warnind, etc.).
messageUser provided message included in the report.

Implements IG::Lib::IReporterBase.

void IG::Lib::ReporterBase::ReportError ( string  location,
string  message,
Exception  ex 
) [inline]

Basic error reporting method (overloaded). Supplemental data (such as objects necessary to launch visualize the report or operation flags) are obtained from the class' instance.

Parameters:
locationUser-provided description of error location.
messageUser-provided description of error.
exException thrown when error occurred.

Implements IG::Lib::IReporterBase.

void IG::Lib::ReporterBase::ReportError ( string  message,
Exception  ex 
) [inline]

Launches an error report.

Parameters:
messageUser-provided description of error.
exException that is the cause for launching the report (and from which additional information is extracted).

Implements IG::Lib::IReporterBase.

void IG::Lib::ReporterBase::ReportError ( Exception  ex,
string  location 
) [inline]

Launches an error report.

Parameters:
exException that is the cause for launching the report (and from which additional information is extracted).
locationUser-provided description of error location.

Implements IG::Lib::IReporterBase.

void IG::Lib::ReporterBase::ReportError ( Exception  ex) [inline]

Launches an error report. Predominantly for error and warning reports.

Parameters:
exException that is the cause for launching the report (and from which additional information is extracted).

Implements IG::Lib::IReporterBase.

void IG::Lib::ReporterBase::ReportError ( string  location,
string  message 
) [inline]

Launches an error report.

Parameters:
locationUser provided description of the location where report was triggered.
messageUser provided message included in the report.

Implements IG::Lib::IReporterBase.

void IG::Lib::ReporterBase::ReportError ( string  message) [inline]

Launches an error report.

Parameters:
messageUser provided message included in the report.

Implements IG::Lib::IReporterBase.

void IG::Lib::ReporterBase::ReportWarning ( string  location,
string  message,
Exception  ex 
) [inline]

Basic warning reporting method (overloaded). Supplemental data (such as objects necessary to launch visualize the report or operation flags) are obtained from the class' instance.

Parameters:
locationUser-provided description of error location.
messageUser-provided description of error.
exException thrown when error occurred.

Implements IG::Lib::IReporterBase.

void IG::Lib::ReporterBase::ReportWarning ( string  message,
Exception  ex 
) [inline]

Launches a warning report.

Parameters:
messageUser-provided description of error.
exException that is the cause for launching the report (and from which additional information is extracted).

Implements IG::Lib::IReporterBase.

void IG::Lib::ReporterBase::ReportWarning ( Exception  ex,
string  location 
) [inline]

Launches a warning report.

Parameters:
exException that is the cause for launching the report (and from which additional information is extracted).
locationUser-provided description of error location.

Implements IG::Lib::IReporterBase.

void IG::Lib::ReporterBase::ReportWarning ( Exception  ex) [inline]

Launches a warning report. Predominantly for error and warning reports.

Parameters:
exException that is the cause for launching the report (and from which additional information is extracted).

Implements IG::Lib::IReporterBase.

void IG::Lib::ReporterBase::ReportWarning ( string  location,
string  message 
) [inline]

Launches a warning report.

Parameters:
locationUser provided description of the location where report was triggered.
messageUser provided message included in the report.

Implements IG::Lib::IReporterBase.

void IG::Lib::ReporterBase::ReportWarning ( string  message) [inline]

Launches a warning report.

Parameters:
messageUser provided message included in the report.

Implements IG::Lib::IReporterBase.

void IG::Lib::ReporterBase::ReportInfo ( Exception  ex) [inline]

Launches an info.

Parameters:
exException that is the cause for launching the report (and from which additional information is extracted).

Implements IG::Lib::IReporterBase.

void IG::Lib::ReporterBase::ReportInfo ( string  location,
string  message 
) [inline]

Launches an info.

Parameters:
locationUser provided description of the location where report was triggered.
messageUser provided message included in the report.

Implements IG::Lib::IReporterBase.

void IG::Lib::ReporterBase::ReportInfo ( string  message) [inline]

Launches an info.

Parameters:
messageUser provided message included in the report.

Implements IG::Lib::IReporterBase.

virtual void IG::Lib::ReporterBase::PrintIntro ( TextWriter  tw,
string  introtext,
string  programname 
) [inline, protected, virtual]

Writes to a textwriter the introduction text that is usually printed before logging starts.

Parameters:
twThe TextWriter that the text is written to.
introtextIntroduction text that is printed (if null then text will be composed); additional newlines are printed.
programnameName of the program or other entity that uses the reporter.
bool IG::Lib::ReporterBase::SetTW ( ref TextWriter  tw,
ref bool  disptw,
TextWriter  writer,
bool  writeintro,
bool  disposewriter 
) [inline, protected]

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

Parameters:
twTextwriter that is updated.
disptwReference to the dispose flag that is also remembered.
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::SetTW ( ref TextWriter  tw,
ref bool  disptw,
Stream  stream,
bool  writeintro,
bool  disposewriter 
) [inline, protected]

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:
twTextwriter that is updated.
disptwReference to the dispose flag that is also remembered.
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::SetTW ( ref TextWriter  tw,
ref bool  disptw,
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:
twTextwriter that is updated.
disptwReference to the dispose flag that is also remembered.
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.
bool IG::Lib::ReporterBase::AddTW ( ref List< TWClass lwriters,
TextWriter  writer,
bool  writeintro,
bool  disposewriter 
) [inline, protected]

Adds another TextWriter to which reporting will also be performed.

Parameters:
lwritersList on which a TextWriter is added.
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::AddTW ( ref List< TWClass lwriters,
Stream  stream,
bool  writeintro,
bool  disposewriter 
) [inline, protected]

Creates a TextWriter from the stream and adds it to the list of TextWriters on which reporting is also performed. Overrides the writeintro property by the 'writeintro' argument.

Parameters:
lwritersList on which a TextWriter is added.
streamStream 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::AddTW ( ref List< TWClass lwriters,
string  filename,
bool  append,
bool  writeintro,
bool  disposewriter 
) [inline, protected]

Creates a TextWriter from a specific file and adds it to the list of TextWriters on 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:
lwritersList on which a TextWriter is added.
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.
int IG::Lib::ReporterBase::FindTW ( List< TWClass lwriters,
TextWriter  writer 
) [inline, private]

Returns the first object on the list that contains a specific TextWriter.

int IG::Lib::ReporterBase::FindTW ( List< TWClass lwriters,
Stream  stream 
) [inline, private]

Returns the first object on the list whose TextWriter has been created from the specific Stream.

int IG::Lib::ReporterBase::FindTW ( List< TWClass lwriters,
string  filename 
) [inline, private]

Returns the first object on the list whose TextWriter has been created from a file with the specific name.

bool IG::Lib::ReporterBase::RemoveTW ( List< TWClass lwriters,
TextWriter  writer 
) [inline, protected]

Removes the first object from a list that contains the specified TextWriter.

Returns:
true if the appropriate text writer was found and successfully removed.
bool IG::Lib::ReporterBase::RemoveTW ( List< TWClass lwriters,
Stream  stream 
) [inline, protected]

Removes the first object from a list whose TextWriter has been created form the specified stream.

bool IG::Lib::ReporterBase::RemoveTW ( List< TWClass lwriters,
string  filename 
) [inline, protected]

Removes the first object from a list whose TextWriter has been created form the file with the specified name.

virtual void IG::Lib::ReporterBase::TextWriterPrintIntro ( TextWriter  tw) [inline, protected, virtual]

Writes to a textwriter the introduction text that is usually printed before logging starts.

Parameters:
twThe TextWriter that the text is written to.
bool IG::Lib::ReporterBase::SetTextWriter ( TextWriter  writer) [inline]

Sets the text writer to which reporting is also performed.

Parameters:
writerTextwriter to which reporting will be performed.
Returns:
True if a new writer has been successfully set and is ready to use, false otherwise.

Implements IG::Lib::IReporterTextWriter.

bool IG::Lib::ReporterBase::SetTextWriter ( TextWriter  writer,
bool  writeintro 
) [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.
Returns:
True if a new writer has been successfully set and is ready to use, false otherwise.

Implements IG::Lib::IReporterTextWriter.

bool IG::Lib::ReporterBase::SetTextWriter ( 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.

Implements IG::Lib::IReporterTextWriter.

bool IG::Lib::ReporterBase::SetTextWriter ( Stream  stream) [inline]

Creates a TextWriter upon the stream and sets it as the text writer to which reporting is also performed.

Parameters:
writerStream to which reporting will be performed.
Returns:
True if a new writer has been successfully set and is ready to use, false otherwise.

Implements IG::Lib::IReporterTextWriter.

bool IG::Lib::ReporterBase::SetTextWriter ( Stream  stream,
bool  writeintro 
) [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.
Returns:
True if a new writer has been successfully set and is ready to use, false otherwise.

Implements IG::Lib::IReporterTextWriter.

bool IG::Lib::ReporterBase::SetTextWriter ( 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.

Implements IG::Lib::IReporterTextWriter.

bool IG::Lib::ReporterBase::SetTextWriter ( string  filename) [inline]

Creates a TextWriter upon a file and sets it as the basic TextWriter to which reporting is also performed. The file is overwritten.

Parameters:
filenameName of the file to which reporting will be performed.
Returns:
True if a new writer has been successfully set and is ready to use, false otherwise.

Implements IG::Lib::IReporterTextWriter.

bool IG::Lib::ReporterBase::SetTextWriter ( string  filename,
bool  append 
) [inline]

Creates a TextWriter upon a file and sets it as the basic TextWriter to which reporting is also performed, where the caller specifies either to overwrite the file or to append to it.

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.
Returns:
True if a new writer has been successfully set and is ready to use, false otherwise.

Implements IG::Lib::IReporterTextWriter.

bool IG::Lib::ReporterBase::SetTextWriter ( string  filename,
bool  append,
bool  writeintro 
) [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.
Returns:
True if a new writer has been successfully set and is ready to use, false otherwise.

Implements IG::Lib::IReporterTextWriter.

bool IG::Lib::ReporterBase::SetTextWriter ( 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.

Implements IG::Lib::IReporterTextWriter.

bool IG::Lib::ReporterBase::AddTextWriter ( TextWriter  writer) [inline]

Sets the text writer to which reporting is also performed.

Parameters:
writerTextwriter to which reporting will be performed.
Returns:
True if a new writer has been successfully set and is ready to use, false otherwise.

Implements IG::Lib::IReporterTextWriter.

bool IG::Lib::ReporterBase::AddTextWriter ( TextWriter  writer,
bool  writeintro 
) [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.
Returns:
True if a new writer has been successfully set and is ready to use, false otherwise.

Implements IG::Lib::IReporterTextWriter.

bool IG::Lib::ReporterBase::AddTextWriter ( 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.

Implements IG::Lib::IReporterTextWriter.

bool IG::Lib::ReporterBase::AddTextWriter ( Stream  stream) [inline]

Creates a TextWriter from the stream and adds it to the list of TextWriters on which reporting is also performed.

Parameters:
writerStream to which reporting will be performed.
Returns:
True if a new writer has been successfully set and is ready to use, false otherwise.

Implements IG::Lib::IReporterTextWriter.

bool IG::Lib::ReporterBase::AddTextWriter ( Stream  stream,
bool  writeintro 
) [inline]

Creates a TextWriter from the stream and adds it to the list of TextWriters on which reporting is also 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.
Returns:
True if a new writer has been successfully set and is ready to use, false otherwise.

Implements IG::Lib::IReporterTextWriter.

bool IG::Lib::ReporterBase::AddTextWriter ( Stream  stream,
bool  writeintro,
bool  disposewriter 
) [inline]

Creates a TextWriter from the stream and adds it to the list of TextWriters on which reporting is also 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.

Implements IG::Lib::IReporterTextWriter.

bool IG::Lib::ReporterBase::AddTextWriter ( string  filename) [inline]

Creates a TextWriter from the file name and adds it to the list of TextWriters on which reporting is also performed. The file is overwritten.

Parameters:
filenameName of the file to which reporting will be performed.
Returns:
True if a new writer has been successfully set and is ready to use, false otherwise.

Implements IG::Lib::IReporterTextWriter.

bool IG::Lib::ReporterBase::AddTextWriter ( string  filename,
bool  append 
) [inline]

Creates a TextWriter from the stream and adds it to the list of TextWriters on which reporting is also performed. The caller specifies either to overwrite the file or to append to it.

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.
Returns:
True if a new writer has been successfully set and is ready to use, false otherwise.

Implements IG::Lib::IReporterTextWriter.

bool IG::Lib::ReporterBase::AddTextWriter ( string  filename,
bool  append,
bool  writeintro 
) [inline]

Creates a TextWriter from the stream and adds it to the list of TextWriters on 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.
Returns:
True if a new writer has been successfully set and is ready to use, false otherwise.

Implements IG::Lib::IReporterTextWriter.

bool IG::Lib::ReporterBase::AddTextWriter ( string  filename,
bool  append,
bool  writeintro,
bool  disposewriter 
) [inline]

Creates a TextWriter from the stream and adds it to the list of TextWriters on 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.

Implements IG::Lib::IReporterTextWriter.

bool IG::Lib::ReporterBase::RemoveTextWriters ( ) [inline]

Removes all text writers from the TextWriter subsystem. If appropriate, the corresponding text writer is closed.

Returns:
true if al text writers were successfully removed, false if there were problems.

Implements IG::Lib::IReporterTextWriter.

bool IG::Lib::ReporterBase::RemoveTextWriter ( ) [inline]

Removes the default text writer from the TextWriter subsystem. If appropriate, the corresponding text writer is closed.

Returns:
true if the text writer was successfully removed, false otherwise (also if there is no writer installed)

Implements IG::Lib::IReporterTextWriter.

bool IG::Lib::ReporterBase::RemoveTextWriter ( TextWriter  writer) [inline]

Removes the first object from Writers that contains the specified TextWriter. If appropriate, the corresponding text writer is closed.

Returns:
true if the text writer was successfully removed, false otherwise (also if there is no writer installed corresponding the argument)

Implements IG::Lib::IReporterTextWriter.

bool IG::Lib::ReporterBase::RemoveTextWriter ( Stream  stream) [inline]

Removes the first object from Writers whose TextWriter has been created form the specified stream. If appropriate, the corresponding text writer is closed.

Returns:
true if the text writer was successfully removed, false otherwise (also if there is no writer installed corresponding the argument)

Implements IG::Lib::IReporterTextWriter.

bool IG::Lib::ReporterBase::RemoveTextWriter ( string  filename) [inline]

Removes the first object from Writers whose TextWriter has been created form the file with the specified name. If appropriate, the corresponding text writer is closed.

Returns:
true if the text writer was successfully removed, false otherwise (also if there is no writer installed corresponding the argument)

Implements IG::Lib::IReporterTextWriter.

List<TextWriter> IG::Lib::ReporterBase::TextWriterWriters ( ) [inline]

Returns a list of all text writers that are currently used by the reporter's text writer. Only text writers that are actually writable are included.

Returns:
List of text writers that are currently used by the reporter's text writer (only those that are actually writable are included).

Implements IG::Lib::IReporterTextWriter.

List<TextWriter> IG::Lib::ReporterBase::TextWriterWriters ( bool  writableonly) [inline]

Returns a list of all text writers that are currently used by the reporter's text writer. Warning: Beware of thread safety issues! Blocks of code where the returned list is used should be enclosed in lock(reporter.lockobj){...} block (where reporter is the object through which this method was called).

Parameters:
writableonlyIf true then only those text writers are listed that are actually writable. If false then all text writers are listed.
Returns:
List of text writers that are currently used by the reporter's text writer.

Implements IG::Lib::IReporterTextWriter.

int IG::Lib::ReporterBase::TextWriterNumWriters ( ) [inline]

Returns the current number of text writers used by the reporter's text logging module. Only text writers that are actually writable are counted.

Returns:
The current number of text writers used by the reporter's text logging module (only those that are actually writable are counted).

Implements IG::Lib::IReporterTextWriter.

int IG::Lib::ReporterBase::TextWriterNumWriters ( bool  writableonly) [inline]

Returns the current number of TextWriters used by the reporter's text logging module.

Parameters:
writableonlyIf true then only those text writers are counted that are actually writable. If false then all text writers are returned.
Returns:
The current number of text writers used by the reporter's text logging module.

Implements IG::Lib::IReporterTextWriter.

int IG::Lib::ReporterBase::TextWriterFlush ( ) [inline]

Flushes all text writers of the Writer's TextWriter subsystem.

Returns:
Number of writers that has actually been flushed.

Implements IG::Lib::IReporterTextWriter.

int IG::Lib::ReporterBase::TextWriterWrite ( string  str) [inline]

Writes a string to all text writers of the Writer's TextWriter subsystem.

Parameters:
strString to be written.
Returns:
Number of writers that the string has actually been written to.

Implements IG::Lib::IReporterTextWriter.

int IG::Lib::ReporterBase::TextWriterWriteLine ( string  str) [inline]

Similar to TextWriterWrite(), except that a newline is added at the end of the string.

Implements IG::Lib::IReporterTextWriter.

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

Default delegate for launching reports (actually logging reports) via text writer.

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::ReporterBase::DefaultReportLocation_TextWriter ( 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::ReporterBase::DefaultReportMessage_TextWriter ( 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::ReporterBase::Report_TextWriter ( ReportType  messagetype,
string  location,
string  message,
Exception  ex 
) [inline, protected, virtual]

Launches a report via text writers. 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.
virtual void IG::Lib::ReporterBase::TextLoggerPrintIntro ( TextWriter  tw) [inline, protected, virtual]

Writes to a textwriter the introduction text that is usually printed before logging starts.

Parameters:
twThe TextWriter that the text is written to.
bool IG::Lib::ReporterBase::SetTextLogger ( TextWriter  writer) [inline]

Sets the text writer to which reporting is also performed.

Parameters:
writerTextwriter to which reporting will be performed.
Returns:
True if a new writer has been successfully set and is ready to use, false otherwise.

Implements IG::Lib::IReporterTextLogger.

bool IG::Lib::ReporterBase::SetTextLogger ( TextWriter  writer,
bool  writeintro 
) [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.
Returns:
True if a new writer has been successfully set and is ready to use, false otherwise.

Implements IG::Lib::IReporterTextLogger.

bool IG::Lib::ReporterBase::SetTextLogger ( 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.

Implements IG::Lib::IReporterTextLogger.

bool IG::Lib::ReporterBase::SetTextLogger ( Stream  stream) [inline]

Creates a TextWriter upon the stream and sets it as the text writer to which reporting is also performed.

Parameters:
writerStream to which reporting will be performed.
Returns:
True if a new writer has been successfully set and is ready to use, false otherwise.

Implements IG::Lib::IReporterTextLogger.

bool IG::Lib::ReporterBase::SetTextLogger ( Stream  stream,
bool  writeintro 
) [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.
Returns:
True if a new writer has been successfully set and is ready to use, false otherwise.

Implements IG::Lib::IReporterTextLogger.

bool IG::Lib::ReporterBase::SetTextLogger ( 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.

Implements IG::Lib::IReporterTextLogger.

bool IG::Lib::ReporterBase::SetTextLogger ( string  filename) [inline]

Creates a TextWriter upon a file and sets it as the basic TextWriter to which reporting is also performed. The file is overwritten.

Parameters:
filenameName of the file to which reporting will be performed.
Returns:
True if a new writer has been successfully set and is ready to use, false otherwise.

Implements IG::Lib::IReporterTextLogger.

bool IG::Lib::ReporterBase::SetTextLogger ( string  filename,
bool  append 
) [inline]

Creates a TextWriter upon a file and sets it as the basic TextWriter to which reporting is also performed, where the caller specifies either to overwrite the file or to append to it.

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.
Returns:
True if a new writer has been successfully set and is ready to use, false otherwise.

Implements IG::Lib::IReporterTextLogger.

bool IG::Lib::ReporterBase::SetTextLogger ( string  filename,
bool  append,
bool  writeintro 
) [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.
Returns:
True if a new writer has been successfully set and is ready to use, false otherwise.

Implements IG::Lib::IReporterTextLogger.

bool IG::Lib::ReporterBase::SetTextLogger ( 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.

Implements IG::Lib::IReporterTextLogger.

bool IG::Lib::ReporterBase::AddTextLogger ( TextWriter  writer) [inline]

Sets the text writer to which reporting is also performed.

Parameters:
writerTextwriter to which reporting will be performed.
Returns:
True if a new writer has been successfully set and is ready to use, false otherwise.

Implements IG::Lib::IReporterTextLogger.

bool IG::Lib::ReporterBase::AddTextLogger ( TextWriter  writer,
bool  writeintro 
) [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.
Returns:
True if a new writer has been successfully set and is ready to use, false otherwise.

Implements IG::Lib::IReporterTextLogger.

bool IG::Lib::ReporterBase::AddTextLogger ( 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.

Implements IG::Lib::IReporterTextLogger.

bool IG::Lib::ReporterBase::AddTextLogger ( Stream  stream) [inline]

Creates a TextWriter from the stream and adds it to the list of TextWriters on which reporting is also performed.

Parameters:
writerStream to which reporting will be performed.
Returns:
True if a new writer has been successfully set and is ready to use, false otherwise.

Implements IG::Lib::IReporterTextLogger.

bool IG::Lib::ReporterBase::AddTextLogger ( Stream  stream,
bool  writeintro 
) [inline]

Creates a TextWriter from the stream and adds it to the list of TextWriters on which reporting is also 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.
Returns:
True if a new writer has been successfully set and is ready to use, false otherwise.

Implements IG::Lib::IReporterTextLogger.

bool IG::Lib::ReporterBase::AddTextLogger ( Stream  stream,
bool  writeintro,
bool  disposewriter 
) [inline]

Creates a TextWriter from the stream and adds it to the list of TextWriters on which reporting is also 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.

Implements IG::Lib::IReporterTextLogger.

bool IG::Lib::ReporterBase::AddTextLogger ( string  filename) [inline]

Creates a TextWriter from the file name and adds it to the list of TextWriters on which reporting is also performed. The file is overwritten.

Parameters:
filenameName of the file to which reporting will be performed.
Returns:
True if a new writer has been successfully set and is ready to use, false otherwise.

Implements IG::Lib::IReporterTextLogger.

bool IG::Lib::ReporterBase::AddTextLogger ( string  filename,
bool  append 
) [inline]

Creates a TextWriter from the stream and adds it to the list of TextWriters on which reporting is also performed. The caller specifies either to overwrite the file or to append to it.

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.
Returns:
True if a new writer has been successfully set and is ready to use, false otherwise.

Implements IG::Lib::IReporterTextLogger.

bool IG::Lib::ReporterBase::AddTextLogger ( string  filename,
bool  append,
bool  writeintro 
) [inline]

Creates a TextWriter from the stream and adds it to the list of TextWriters on 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.
Returns:
True if a new writer has been successfully set and is ready to use, false otherwise.

Implements IG::Lib::IReporterTextLogger.

bool IG::Lib::ReporterBase::AddTextLogger ( string  filename,
bool  append,
bool  writeintro,
bool  disposewriter 
) [inline]

Creates a TextWriter from the stream and adds it to the list of TextWriters on 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.

Implements IG::Lib::IReporterTextLogger.

bool IG::Lib::ReporterBase::RemoveTextLoggers ( ) [inline]

Removes all text writers from the TextLogger subsystem. If appropriate, the corresponding text writer is closed.

Returns:
true if al text writers were successfully removed, false if there were problems.

Implements IG::Lib::IReporterTextLogger.

bool IG::Lib::ReporterBase::RemoveTextLogger ( ) [inline]

Removes the default text writer from the TextLogger subsystem. If appropriate, the corresponding txt writer is closed.

Returns:
true if the text writer was successfully removed, false otherwise (also if there is no writer installed)

Implements IG::Lib::IReporterTextLogger.

bool IG::Lib::ReporterBase::RemoveTextLogger ( TextWriter  writer) [inline]

Removes the first object from Loggers that contains the specified TextWriter. If appropriate, the corresponding text writer is closed.

Returns:
true if the text writer was successfully removed, false otherwise (also if there is no writer installed corresponding the argument)

Implements IG::Lib::IReporterTextLogger.

bool IG::Lib::ReporterBase::RemoveTextLogger ( Stream  stream) [inline]

Removes the first object from Loggers whose TextWriter has been created form the specified stream. If appropriate, the corresponding text writer is closed.

Returns:
true if the text writer was successfully removed, false otherwise (also if there is no writer installed corresponding the argument)

Implements IG::Lib::IReporterTextLogger.

bool IG::Lib::ReporterBase::RemoveTextLogger ( string  filename) [inline]

Removes the first object from Loggers whose TextWriter has been created form the file with the specified name. If appropriate, the corresponding text writer is closed.

Returns:
true if the text writer was successfully removed, false otherwise (also if there is no writer installed corresponding the argument)

Implements IG::Lib::IReporterTextLogger.

List<TextWriter> IG::Lib::ReporterBase::TextLoggerWriters ( ) [inline]

Returns a list of all text writers that are currently used by the reporter's text logger. Only text writers that are actually writable are included.

Returns:
List of text writers that are currently used by the reporter's text logger (only those that are actually writable are included).

Implements IG::Lib::IReporterTextLogger.

List<TextWriter> IG::Lib::ReporterBase::TextLoggerWriters ( bool  writableonly) [inline]

Returns a list of all text writers that are currently used by the reporter's text logger. Warning: Beware of thread safety issues! Blocks of code where the returned list is used should be enclosed in lock(reporter.lockobj){...} block (where reporter is the object through which this method was called).

Parameters:
writableonlyIf true then only those text writers are listed that are actually writable. If false then all text writers are listed.
Returns:
List of text writers that are currently used by the reporter's text logger.

Implements IG::Lib::IReporterTextLogger.

int IG::Lib::ReporterBase::TextLoggerNumWriters ( ) [inline]

Returns the current number of text writers used by the reporter's text logging module. Only text writers that are actually writable are counted.

Returns:
The current number of text writers used by the reporter's text logging module (only those that are actually writable are counted).

Implements IG::Lib::IReporterTextLogger.

int IG::Lib::ReporterBase::TextLoggerNumWriters ( bool  writableonly) [inline]

Returns the current number of TextWriters used by the reporter's text logging module.

Parameters:
writableonlyIf true then only those text writers are counted that are actually writable. If false then all text writers are returned.
Returns:
The current number of text writers used by the reporter's text logging module.

Implements IG::Lib::IReporterTextLogger.

int IG::Lib::ReporterBase::TextLoggerFlush ( ) [inline]

Flushes all text writers of the Writer's TextLogger subsystem.

Returns:
Number of writers that has actually been flushed.

Implements IG::Lib::IReporterTextLogger.

int IG::Lib::ReporterBase::TextLoggerWrite ( string  str) [inline]

Writes a string to all text writers of the Writer's TextLogger subsystem.

Parameters:
strString to be written.
Returns:
Number of writers that the string has actually been written to.

Implements IG::Lib::IReporterTextLogger.

int IG::Lib::ReporterBase::TextLoggerWriteLine ( string  str) [inline]

Similar to TextLoggerWrite(), except that a newline is added at the end of the string.

Implements IG::Lib::IReporterTextLogger.

static string IG::Lib::ReporterBase::FormatLogMsgDefault ( int  depth,
int  initialindent,
int  indentincrement,
char  indentchar,
ReportType  type,
string  location,
string  message,
ReportSource  source 
) [inline, static]

Formats a one-line message for tracing output.

Parameters:
depthIndentation level.
indentincrementIndentation spacing.
indentcharIndentation character.
typeType of the message.
locationString denoting location of the message.
messageMessage to be output.
sourceIndication of message source.
Returns:
String taht is output as the one-line message.
static void IG::Lib::ReporterBase::DefaultReport_TextLogger ( ReporterBase  reporter,
ReportType  messagetype,
string  location,
string  message 
) [inline, static, protected]

Default delegate for launching reports (actually logging reports) via text writer.

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::ReporterBase::DefaultReportLocation_TextLogger ( 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::ReporterBase::DefaultReportMessage_TextLogger ( 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::ReporterBase::Report_TextLogger ( ReportType  messagetype,
string  location,
string  message,
Exception  ex 
) [inline, protected, virtual]

Launches a report via text logger. 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.
static string IG::Lib::ReporterBase::FormatTraceMsgDefault ( int  depth,
int  initialindent,
int  indentincrement,
char  indentchar,
ReportType  type,
string  location,
string  message,
ReportSource  source 
) [inline, static]

Formats a one-line message for tracing output.

Parameters:
depthIndentation level.
indentincrementIndentation spacing.
indentcharIndentation character.
typeType of the message.
locationString denoting location of the message.
messageMessage to be output.
sourceIndication of message source.
Returns:
String taht is output as the one-line message.
static void IG::Lib::ReporterBase::DefaultReport_Trace ( ReporterBase  reporter,
ReportType  messagetype,
string  location,
string  message 
) [inline, static, protected]

Delegat for launching a report via Trace.

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::ReporterBase::DefaultReportLocation_Trace ( 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::ReporterBase::DefaultReportMessage_Trace ( 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::ReporterBase::Report_Trace ( ReportType  messagetype,
string  location,
string  message,
Exception  ex 
) [inline, protected, virtual]

Launches a report via Trace. 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.
static string IG::Lib::ReporterBase::DefaultReportStringMessageBox ( ReporterBase  reporter,
ReportType  messagetype,
string  errorlocation,
string  errormessage 
) [inline, static]

Auxiliary method that composes the complete message, including decoration, for reports launched in a message box.

Parameters:
reporterReporter object used for reporting.
messagetypeLevel of the message that is reported (Error, Warning, ...)
errorlocationUser description of location that caused the report.
errormessageUser defined message.
Returns:
String that is output by the report.
static string IG::Lib::ReporterBase::DefaultReportStringConsole ( ReporterBase  reporter,
ReportType  messagetype,
string  errorlocation,
string  errormessage 
) [inline, static]

Auxiliary method that composes the complete message, including decoration, for reports launched in consoles.

Parameters:
reporterReporter object used for reporting.
messagetypeLevel of the message that is reported (Error, Warning, ...)
errorlocationUser description of location that caused the report.
errormessageUser defined message.
Returns:
String that is output by the report.
static string IG::Lib::ReporterBase::DefaultReportStringConsoleTimeStamp ( ReporterBase  reporter,
ReportType  messagetype,
string  errorlocation,
string  errormessage 
) [inline, static]

Auxiliary method that composes the complete message, including decoration with a TIMESTAMP, for reports launched in consoles.

Parameters:
reporterReporter object used for reporting.
messagetypeLevel of the message that is reported (Error, Warning, ...)
errorlocationUser description of location that caused the report.
errormessageUser defined message.
Returns:
String that is output by the report.
static string IG::Lib::ReporterBase::DefaultReportStringConsoleBas ( ReporterBase  reporter,
ReportType  messagetype,
string  errorlocation,
string  errormessage,
bool  timestamp 
) [inline, static]

Base method for DefaultReportStringConsole and DefaultReportStringConsoleTimeStamp.

Parameters:
reporterReporter object used for reporting.
messagetypeLevel of the message that is reported (Error, Warning, ...)
errorlocationUser description of location that caused the report.
errormessageUser defined message.
timestampSpecifies whether to include a time stamp in the message.
Returns:
String that is output by the report.
static void IG::Lib::ReporterBase::DefaultReportConsole ( ReporterBase  reporter,
ReportType  messagetype,
string  errorlocation,
string  errormessage 
) [inline, static]

Default delegate for reporting. For parameter descriptions, see ReportDlg.

static string IG::Lib::ReporterBase::DefaultLocationString ( ReporterBase  reporter,
ReportType  messagetype,
string  location,
Exception  ex 
) [inline, static]

Default delegate for assembly of the location string when reporting on consoles. For parameter descriptions, see ReportMessageDlg.

static string IG::Lib::ReporterBase::DefaultMessageString ( ReporterBase  reporter,
ReportType  messagetype,
string  basicmessage,
Exception  ex 
) [inline, static]

Default delegate for message assembly of the message string when reporting on consoles. For parameter descriptions, see ReportMessageDlg.

static string IG::Lib::ReporterBase::DefaultReserveReportMessage ( ReporterBase  reporter,
ReportType  messagetype,
string  location,
string  message,
Exception  ex,
Exception  ex1 
) [inline, static]

Default function function for assembling reserve error reporting message. This is put outside the DefaultReserveReportError() method such that the same assembly method can be used in different systems. The method is considered bulletproof.

Parameters:
messagetypeLevel of the message (Error, Warning,Info, etc.)
locationLocation string as passed to the error reporting function that has thrown an exception.
messageError message string as passed to the error reporting function that has thrown an exception.
exOriginal exception that was being reported when the error reporting function threw an exception.
ex1Exception thrown by the error reporting function.

static void IG::Lib::ReporterBase::DefaultReserveReportError ( ReporterBase  reporter,
ReportType  messagetype,
string  location,
string  message,
Exception  ex,
Exception  ex1 
) [inline, static]

Default function function for reserve error reporting (called if an exception is thrown in a reporting function). Writes a report to the application's standard console (if defined) and Reporter's text writers and loggers (when defined). Writing is unconditional (e.g., even if reporter.UseTextWriter = false or reporter.ReportingLevel = Off, a message is written to the TextWriter's output streams).

Parameters:
reporterReporter object whre the method can get additional information.
messagetypeLevel of the message (Error, Warning,Info, etc.)
locationLocation string as passed to the error reporting function that has thrown an exception.
messageError message string as passed to the error reporting function that has thrown an exception.
exOriginal exception that was being reported when the error reporting function threw an exception.
ex1Exception thrown by the error reporting function.
static string IG::Lib::ReporterBase::ErrorLocationString0 ( Exception  ex) [inline, static]

Returns location string derived from ex, which includes information about the location where error occurred, specified by the source file name, function and line and column numbers.

Parameters:
ex
Returns:
static string IG::Lib::ReporterBase::ErrorLocationString0 ( string  location,
Exception  ex 
) [inline, static]

Returns Error location string derived from ex, which includes information about location of error occurrence and is prepended by additional location information (such as class name)

Parameters:
location
ex
Returns:
static void IG::Lib::ReporterBase::Test ( ) [inline, static, private]

Member Data Documentation

ReportDelegate IG::Lib::ReporterBase::ReportDlg = null

Delegate that performs error reporting. 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::ReporterBase::ReportLocationDlg = null

Delegate that assembles the error location string.

ReportMessageDelegate IG::Lib::ReporterBase::ReportMessageDlg = null

Delegate that assembles the eror message string.

ReserveReportErrorDelegate IG::Lib::ReporterBase::ReserveReportErrorDlg = null

Delegate that reports an error when the error reporting function throws an exception. Functions assigned to this delegate should really be BULLETPROOF. If not assigned then the internal method of the corresponding class is called. It is highly recommended to do reporting in small steps enclosed in try/catch blocks and especially to use the error reporting object very carefully (because it may not be initialized properly, which can also be the reason that the error reporting function crashes). It is higly recommended to first call the DefaultReserveReportError() within the function assigned to this delegate, or at least to use the DefaultReserveReportMessage() method for assembly of the message shown.

bool IG::Lib::ReporterBase::isDisposed = false [private]
bool IG::Lib::ReporterBase::dispLocked = false [private]

Indicates whether a global Reporter (or its derived class) should read settings from the application configuration file when initialized (default is true).

const string IG::Lib::ReporterBase::KeyPrefix = "ReporterMsg" [protected]
List<String> IG::Lib::ReporterBase::readconf = null [private]
const string IG::Lib::ReporterBase::KeyLevelOn = "LevelOn" [protected]
const string IG::Lib::ReporterBase::KeyLevelOff = "LevelOff" [private]
const string IG::Lib::ReporterBase::KeyReportingLevel = "ReportingLevel" [private]
const string IG::Lib::ReporterBase::KeyLoggingLevel = "LoggingLevel" [private]
const string IG::Lib::ReporterBase::KeyTracingLevel = "TracingLevel" [private]
const string IG::Lib::ReporterBase::KeyUseTextWriter = "UseTextWriter" [private]
const string IG::Lib::ReporterBase::KeyUseTextLogger = "UseTextLogger" [private]
const string IG::Lib::ReporterBase::KeyUseTrace = "UseTrace" [private]
const string IG::Lib::ReporterBase::KeyTextWriterAppend = "TextWriterAppend" [private]
const string IG::Lib::ReporterBase::KeyTextWriterFile = "TextWriterFile" [private]
const string IG::Lib::ReporterBase::KeyTextWriterFile1 = "TextWriterFile1" [private]
const string IG::Lib::ReporterBase::KeyTextWriterWriteIntro = "TextWriterWriteIntro" [private]
const string IG::Lib::ReporterBase::KeyTextWriterProgramName = "TextWriterProgramName" [private]
const string IG::Lib::ReporterBase::KeyTextWriterIntroText = "TextWriterIntroText" [private]
const string IG::Lib::ReporterBase::KeyTextLoggerAppend = "TextLoggerAppend" [private]
const string IG::Lib::ReporterBase::KeyTextLoggerFile = "TextLoggerFile" [private]
const string IG::Lib::ReporterBase::KeyTextLoggerFile1 = "TextLoggerFile1" [private]
const string IG::Lib::ReporterBase::KeyTextLoggerWriteIntro = "TextLoggerWriteIntro" [private]
const string IG::Lib::ReporterBase::KeyTextLoggerProgramName = "TextLoggerProgramName" [private]
const string IG::Lib::ReporterBase::KeyTextLoggerIntroText = "TextLoggerIntroText" [private]
const string IG::Lib::ReporterBase::KeyTextLoggerIndentInitial = "TextLoggerIndentInitial" [private]
const string IG::Lib::ReporterBase::KeyTextLoggerIndentSpacing = "TextLoggerIndentSpacing" [private]
const string IG::Lib::ReporterBase::KeyTextLoggerIndentCharacter = "TextLoggerIndentCharacter" [private]
const string IG::Lib::ReporterBase::KeyAppSettingsWarnings = "AppSettingsWarnings" [private]

Indicates that reporting suitable for debugging mode should be performed. A standard flag that can be used by the delegate functions.

bool IG::Lib::ReporterBase::_IsGlobal = false [private]
int IG::Lib::ReporterBase::_Depth = 0 [private]
int IG::Lib::ReporterBase::numErrIndentLevel = 0 [static, private]
int IG::Lib::ReporterBase::numErrInitialIndent = 0 [static, private]
int IG::Lib::ReporterBase::numErrIndentSpacing = 0 [static, private]
const ReportLevel IG::Lib::ReporterBase::DefaultReportingLevel = ReportLevel.Warning [private]
const ReportLevel IG::Lib::ReporterBase::DefaultLoggingLevel = ReportLevel.Warning [private]
const ReportLevel IG::Lib::ReporterBase::DefaultTracingLevel = ReportLevel.Info [private]
TraceSwitch IG::Lib::ReporterBase::_ReportingSwitch = null [protected]
TraceSwitch IG::Lib::ReporterBase::_LoggingSwitch = null [private]
TraceSwitch IG::Lib::ReporterBase::_TracingSwitch = null [private]
object IG::Lib::ReporterBase::_obj = null [private]
object IG::Lib::ReporterBase::_lockobj = new Object() [protected]
TextWriter IG::Lib::ReporterBase::Writer = null [private]
bool IG::Lib::ReporterBase::DisposeWriter = false [private]
List<TWClass> IG::Lib::ReporterBase::Writers = new List<TWClass>() [private]
ReportDelegate IG::Lib::ReporterBase::ReportDlgTextWriter = new ReportDelegate(DefaultReport_TextWriter)

Delegate that performs reporting (actually logging) via text writer.

ReportLocationDelegate IG::Lib::ReporterBase::ReportLocationDlgTextWriter = new ReportLocationDelegate(DefaultReportLocation_TextWriter)

Delegate that assembles the location string for reporting via TextWriter.

ReportMessageDelegate IG::Lib::ReporterBase::ReportMessageDlgTextWriter = new ReportMessageDelegate(DefaultReportMessage_TextWriter)

Delegate that assembles the message string for reporting via text writer.

bool IG::Lib::ReporterBase::_UseTextLogger = false [private]
TextWriter IG::Lib::ReporterBase::Logger = null [private]
bool IG::Lib::ReporterBase::DisposeLogger = false [private]
List<TWClass> IG::Lib::ReporterBase::Loggers = new List<TWClass>() [private]
ReportDelegate IG::Lib::ReporterBase::ReportDlgTextLogger = new ReportDelegate(DefaultReport_TextLogger)

Delegate that performs reporting (actually logging) via text writer.

ReportLocationDelegate IG::Lib::ReporterBase::ReportLocationDlgTextLogger = new ReportLocationDelegate(DefaultReportLocation_TextLogger)

Delegate that assembles the location string for reporting via text logger.

ReportMessageDelegate IG::Lib::ReporterBase::ReportMessageDlgTextLogger = new ReportMessageDelegate(DefaultReportMessage_TextLogger)

Delegate that assembles the message string for reporting via text writer.

bool IG::Lib::ReporterBase::_UseTrace = false [private]

Indicates the source of the message (such as client, server, web service, etc.)

ReportDelegate IG::Lib::ReporterBase::ReportDlgTrace = new ReportDelegate(DefaultReport_Trace)

Delegate that performs reporting (logging) via Pado trace mechanism. 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::ReporterBase::ReportLocationDlgTrace = new ReportLocationDelegate(DefaultReportLocation_Trace)

Delegate that assembles the error location string for reporting (logging) via Pado trace mechanism.

ReportMessageDelegate IG::Lib::ReporterBase::ReportMessageDlgTrace = new ReportMessageDelegate(DefaultReportMessage_Trace)

Delegate that assembles the eror message string for reporting (logging) via Pado trace mechanism.

string IG::Lib::ReporterBase::_newLineReplacement = " ... " [static, private]

Property Documentation

bool IG::Lib::ReporterBase::GlobalInitialized [static, get]

Gets the value indicating whether the global reporter of this class has already been initialized.

Reimplemented in IG::Lib::ReporterConsole, IG::Forms::ReporterForms, IG::Lib::ReporterConsoleMsgboxSpeech, IG::Forms::ReporterConsoleMsgbox, and IG::Forms::ReporterMsgbox.

ReporterBase IG::Lib::ReporterBase::Global [static, get, set]

Gets the global reporter object. This is typically used for configuring the global reporter.

Reimplemented in IG::Lib::ReporterConsole, IG::Forms::ReporterForms, IG::Lib::ReporterConsoleMsgboxSpeech, IG::Forms::ReporterConsoleMsgbox, and IG::Forms::ReporterMsgbox.

bool IG::Lib::ReporterBase::AppSettingsWarnings [get, set]

Gets or sets the flag that specifies whether a warning message is launched when reading of application settings is attempted more than once for the same named group of settings.

Implements IG::Lib::IReporterBase.

bool IG::Lib::ReporterBase::IsGlobal [get, set]

Indicates whether the current reporter is used as a global reporter or not.

This flag is set when the global reporter is initialized.

Implements IG::Lib::IReporterBase.

int IG::Lib::ReporterBase::Depth [get, set]

Gets or sets the current indentation level for on-line output. This should normally be done by calling IncreaseDepth() or DecreaseDepth().

Implements IG::Lib::IReporterBase.

int IG::Lib::ReporterBase::TextLoggerIndentInitial [get, set]

Gets or sets number fo initial indentation charactyers.

Implements IG::Lib::IReporterTextLogger.

int IG::Lib::ReporterBase::TextLoggerIndentSpacing [get, set]

Gets or sets the number of indentation characters written per indentation level.

Implements IG::Lib::IReporterTextLogger.

char IG::Lib::ReporterBase::TextLoggerIndentCharacter [get, set]

Gets or sets the indentation character.

Implements IG::Lib::IReporterTextLogger.

ReportLevel IG::Lib::ReporterBase::ReportingLevel [get, set]

Gets or sets level of output for reporting (console output, message boxes, etc.).

Implements IG::Lib::IReporterBase.

ReportLevel IG::Lib::ReporterBase::LoggingLevel [get, set]

Gets or sets level of output for logging (writing to log files).

Implements IG::Lib::IReporterBase.

ReportLevel IG::Lib::ReporterBase::TracingLevel [get, set]

Gets or sets trace level (for external trace systems).

Implements IG::Lib::IReporterBase.

bool IG::Lib::ReporterBase::TreatError [get]

Returns a boolean value indicating whether errors are treated by the reporter in its current state.

Implements IG::Lib::IReporterBase.

bool IG::Lib::ReporterBase::TreatWarning [get]

Returns a boolean value indicating whether warnings are treated by the reporter in its current state.

Implements IG::Lib::IReporterBase.

bool IG::Lib::ReporterBase::TreatInfo [get]

Returns a boolean value indicating whether info messages are treated by the reporter in its current state.

Implements IG::Lib::IReporterBase.

bool IG::Lib::ReporterBase::TreatUndefined [get]

Returns a boolean value indicating whether undefined messages with the lowest priority are treated by the reporter in its current state.

Implements IG::Lib::IReporterBase.

ReportLevel IG::Lib::ReporterBase::Level [get, set]

Gets the level with the lowesst priority (out of reporting, logging and tracing level), or sets all levels to the assigned level.

Implements IG::Lib::IReporterBase.

virtual bool IG::Lib::ReporterBase::this[ReportLevel level] [get, set]

Indexer that returns true if messages of a given level are treated by the reporter (either by the reporting, logging or tracing part, according to the corresponding level states), or false if not (i.e. if all the levels are set lover than the index). In the case of assignment, when true is assigned, all levels that are set lower than the are set to index. Assignment with false should be used only exteptionally; but in this case all levels that are set higher or equal than the index are set one level below.

Parameters:
levelLevel for which we are interested whether it is treated.
Returns:
True if a specific level (stated as index) is treated, false if not (i.e. if all of the reporting, logging )

Implements IG::Lib::IReporterBase.

TraceSwitch IG::Lib::ReporterBase::ReportingSwitch [get, set]

Gets or sets the TraceSwitch that is synchronized with ReportingLevel. IMPORTANT: State of the object obtained by get accessor must not be changed unless the object is assigned back by the set accessor. If one wants that this TraceSwitch assumes values specified by the configuration file, a corresponding Traceswitch must be created and assigned to this property (otherwise the TraceSwitch will be synchronized with the ReportingLevel, which will override its settings).

Implements IG::Lib::IReporterBase.

TraceSwitch IG::Lib::ReporterBase::LoggingSwitch [get, set]

Gets or sets the TraceSwitch that is synchronized with LoggingLevel. IMPORTANT: State of the object obtained by get accessor must not be changed unless the object is assigned back by the set accessor. If one wants that this TraceSwitch assumes values specified by the configuration file, a corresponding Traceswitch must be created and assigned to this property (otherwise the TraceSwitch will be synchronized with the LoggingLevel, which will override its settings).

Implements IG::Lib::IReporterBase.

TraceSwitch IG::Lib::ReporterBase::TracingSwitch [get, set]

Gets or sets the TraceSwitch that is synchronized with TracingLevel. IMPORTANT: State of the object obtained by get accessor must not be changed unless the object is assigned back by the set accessor. If one wants that this TraceSwitch assumes values specified by the configuration file, a corresponding Traceswitch must be created and assigned to this property (otherwise the TraceSwitch will be synchronized with the TracingLevel, which will override its settings).

Implements IG::Lib::IReporterBase.

bool IG::Lib::ReporterBase::ThrowTestException [get, set]

If true then the basic reporting function will throw an exception. This is intended predominantly for testing how the reporter behaves in case of internal errors. When the exception is thrown, the value is set back to false. If we want an exception to be thrown again then the value must be set to true once again.

object IG::Lib::ReporterBase::Obj [get, set]

Auxiliary object used by the delegates that perform error reporting. The object is used to provide additional information used in error reporting, or to provide objects that perform some actions in error reporting tasks, or both. It is left entirely to error reporting delegates to interpret the object's contents.

Implements IG::Lib::IReporterBase.

virtual object IG::Lib::ReporterBase::lockobj [get]

Object used for locking.

Implements IG::Lib::IReporterBase.

bool IG::Lib::ReporterBase::UseTextWriter [get, set]

Gets or sets the flag specifying whether reporting using a text writer is performed or not.

Implements IG::Lib::IReporterTextWriter.

bool IG::Lib::ReporterBase::TextWriterFlushing [get, set]

Gets or sets the flag that tells whether or not the text writers are flushed after every message that is reported through them.

string IG::Lib::ReporterBase::TextWriterIntroText [get, set]

Gets or sets the introduction string that is written before logging to a TextWriter begins. If this is not specified then the reporter composes its own introduction string, eventually using programname (when defined).

Implements IG::Lib::IReporterTextWriter.

string IG::Lib::ReporterBase::TextWriterProgramName [get, set]

String denoting the name of the program or other entity that uses the Reporter for logging. When introtext is not specified, this name is used in the introduction text composed by the reporter.

Implements IG::Lib::IReporterTextWriter.

bool IG::Lib::ReporterBase::TextWriterWriteIntro [get, set]

Specifies whether introduction text is written before logging of messages begins or not.

Implements IG::Lib::IReporterTextWriter.

bool IG::Lib::ReporterBase::UseTextLogger [get, set]

Gets or sets the flag specifying whether reporting using a text writer is performed or not.

Implements IG::Lib::IReporterTextLogger.

bool IG::Lib::ReporterBase::TextLoggerFlushing [get, set]

Gets or sets the flag that tells whether or not the text writers are flushed after every message that is reported through them.

string IG::Lib::ReporterBase::TextLoggerIntroText [get, set]

Gets or sets the introduction string that is written before logging to a TextWriter begins. If this is not specified then the reporter composes its own introduction string, eventually using programname (when defined).

Implements IG::Lib::IReporterTextLogger.

string IG::Lib::ReporterBase::TextLoggerProgramName [get, set]

String denoting the name of the program or other entity that uses the Reporter for logging. When introtext is not specified, this name is used in the introduction text composed by the reporter.

Implements IG::Lib::IReporterTextLogger.

bool IG::Lib::ReporterBase::TextLoggerWriteIntro [get, set]

Specifies whether introduction text is written before logging of messages begins or not.

Implements IG::Lib::IReporterTextLogger.

bool IG::Lib::ReporterBase::UseTrace [get, set]

Gets or sets the flag specifying whether reporting using the pado trace is performed or not.

Implements IG::Lib::IReporterTrace.


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