IGLib  1.7.2
The IGLib base library EXTENDED - with other lilbraries and applications.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
IG.Lib.ParsableXmlObject.AccummulatedReport Class Reference

Class used for accummulated error and warning reports for task composed of several steps. This is used when we want to perform the whole task even if some errors occur, and treat all errors and messages after the task is completed. More...

+ Collaboration diagram for IG.Lib.ParsableXmlObject.AccummulatedReport:

Public Member Functions

 AccummulatedReport (IReporter rep, string location, bool throwExceptionOnErrors)
 Constructor. More...
 
virtual void Reset ()
 Resets the report (remove all erorrs, warnings and info messages) More...
 
void AddError (string message)
 Adds a new error message to the accummulated report. More...
 
void AddWarning (string message)
 Adds a new warning message to the accummulated report. More...
 
void AddInfo (string message)
 Adds a new info message to the accummulated report. More...
 
virtual void Report ()
 Launches the accummulated report. More...
 

Public Attributes

bool ThrowExceptionOnErrors = true
 If true then exception is thrown in the case of errors when reporting is launched. More...
 
string Location = null
 Description of location where the accummulated repord is generated. More...
 

Properties

int NumErrors [get]
 Get number of errors accummulated on the report. More...
 
int NumWarnings [get]
 Get number of warnings accummulated on the report. More...
 
int NumInfos [get]
 Get number of infos accummulated on the report. More...
 
IReporter R [get, set]
 Gets or sets the reporter used for reporting (if any). More...
 
virtual string ErrorString [get]
 Concatenated string containing all info strings that exist on this class. More...
 
virtual string WarningString [get]
 Concatenated string containing all warning strings that exist on this class. More...
 
virtual string InfoString [get]
 Concatenated string containing all error strings that exist on this class. More...
 
virtual string ErrorAndWarningString [get]
 

Private Member Functions

 AccummulatedReport ()
 

Private Attributes

List< string > _errorStrings = null
 
List< string > _warningStrings = null
 
List< string > _infoStrings = null
 
IReporter _rep = new ReporterConsole()
 

Detailed Description

Class used for accummulated error and warning reports for task composed of several steps. This is used when we want to perform the whole task even if some errors occur, and treat all errors and messages after the task is completed.

Constructor & Destructor Documentation

IG.Lib.ParsableXmlObject.AccummulatedReport.AccummulatedReport ( )
inlineprivate
IG.Lib.ParsableXmlObject.AccummulatedReport.AccummulatedReport ( IReporter  rep,
string  location,
bool  throwExceptionOnErrors 
)
inline

Constructor.

Parameters
repReporter object used for launching reports.
throwExceptionOnErrorsIf true then reporting methods will throw an exception when report contains errors. It is more common practice not to use tehse methods and launch reports & throw exceptions explicitly.

Member Function Documentation

virtual void IG.Lib.ParsableXmlObject.AccummulatedReport.Reset ( )
inlinevirtual

Resets the report (remove all erorrs, warnings and info messages)

void IG.Lib.ParsableXmlObject.AccummulatedReport.AddError ( string  message)
inline
void IG.Lib.ParsableXmlObject.AccummulatedReport.AddWarning ( string  message)
inline

Adds a new warning message to the accummulated report.

Parameters
messageWarning message.

Referenced by IG.Lib.MsgObervationOrder.CheckConsistency().

void IG.Lib.ParsableXmlObject.AccummulatedReport.AddInfo ( string  message)
inline
virtual void IG.Lib.ParsableXmlObject.AccummulatedReport.Report ( )
inlinevirtual

Member Data Documentation

List<string> IG.Lib.ParsableXmlObject.AccummulatedReport._errorStrings = null
private
List<string> IG.Lib.ParsableXmlObject.AccummulatedReport._warningStrings = null
private
List<string> IG.Lib.ParsableXmlObject.AccummulatedReport._infoStrings = null
private
IReporter IG.Lib.ParsableXmlObject.AccummulatedReport._rep = new ReporterConsole()
private
bool IG.Lib.ParsableXmlObject.AccummulatedReport.ThrowExceptionOnErrors = true

If true then exception is thrown in the case of errors when reporting is launched.

string IG.Lib.ParsableXmlObject.AccummulatedReport.Location = null

Description of location where the accummulated repord is generated.

Property Documentation

int IG.Lib.ParsableXmlObject.AccummulatedReport.NumErrors
get

Get number of errors accummulated on the report.

int IG.Lib.ParsableXmlObject.AccummulatedReport.NumWarnings
get

Get number of warnings accummulated on the report.

int IG.Lib.ParsableXmlObject.AccummulatedReport.NumInfos
get

Get number of infos accummulated on the report.

IReporter IG.Lib.ParsableXmlObject.AccummulatedReport.R
getset

Gets or sets the reporter used for reporting (if any).

virtual string IG.Lib.ParsableXmlObject.AccummulatedReport.ErrorString
get

Concatenated string containing all info strings that exist on this class.

virtual string IG.Lib.ParsableXmlObject.AccummulatedReport.WarningString
get

Concatenated string containing all warning strings that exist on this class.

virtual string IG.Lib.ParsableXmlObject.AccummulatedReport.InfoString
get

Concatenated string containing all error strings that exist on this class.

virtual string IG.Lib.ParsableXmlObject.AccummulatedReport.ErrorAndWarningString
get

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