DEBUG::DebugReportInfo Class Reference

#include <DebugReport.h>

List of all members.


Detailed Description

A helper class that gives the functionality of a printf-style error reporting function.

Author:
Richard Marks <ccpsceo@gmail.com>, Redslash
The class stores the function, file and line information so that it may be used later when calling the real reporting functions from the DebugReport class.
Many thanks to RedSlash for this contribution.

Definition at line 70 of file DebugReport.h.


Public Member Functions

 DebugReportInfo (const char *func, const char *file, int line)
void PrintLog (ReportSeverityLevel severity, const char *message, va_list va)
void PrintWarning (const char *message,...)
void PrintError (const char *message,...)
void PrintFatal (const char *message,...)
void PrintMessage (const char *message,...)
void PrintSimpleMessage (const char *message,...)

Private Member Functions

 DebugReportInfo (const DebugReportInfo &rhs)
const DebugReportInfooperator= (const DebugReportInfo &rhs)

Private Attributes

const char * func_
 The name of the Function that the report is being made from. Usually the value of __PRETTY_FUNCTION__ or __func__.
const char * file_
 The name of the File that the report is being made in. Usually the value of __FILE__.
int line_
 The line number that the report is being made on. This is almost always __LINE__.

Constructor & Destructor Documentation

DEBUG::DebugReportInfo::DebugReportInfo ( const char *  func,
const char *  file,
int  line 
)

Initializes class with function, file and line information.

Parameters:
func is the name of the Function that the report is being made from. Usually you should pass __PRETTY_FUNCTION__ here, or __func__.
file is the name of the File that the report is being made in. Usually __FILE__ should be used here.
line is the line number that the report is being made on. This is almost always __LINE__.

Definition at line 27 of file DebugReport.cpp.

DEBUG::DebugReportInfo::DebugReportInfo ( const DebugReportInfo rhs  )  [private]

hidden copy constructor


Member Function Documentation

void DEBUG::DebugReportInfo::PrintLog ( ReportSeverityLevel  severity,
const char *  message,
va_list  va 
)

Formats a report based on the information provided and makes a call to the DebugReport::Log() function.

Parameters:
severity is the report severity level. This can be any of the values DEBUG::DebugReport_Warning, DEBUG::DebugReport_Fatal, DEBUG::DebugReport_Error or DEBUG::DebugReport_Message.
message is the message to be reported. This is a printf-style C-string.
va is an optional number of arguments may be passed here to satisfy the previous printf-style C-string.

Definition at line 36 of file DebugReport.cpp.

References DEBUG::DBGREP_MAX_REPORT_LENGTH, file_, func_, line_, and DEBUG::DebugReport::Log().

Referenced by PrintError(), PrintFatal(), PrintMessage(), and PrintWarning().

Here is the call graph for this function:

Here is the caller graph for this function:

void DEBUG::DebugReportInfo::PrintWarning ( const char *  message,
  ... 
)

Makes a call to the DebugReportInfo::PrintLog() function with the DEBUG::DebugReport_Warning severity level.

Parameters:
message is the message to be reported. This is a printf-style C-string.

Definition at line 55 of file DebugReport.cpp.

References DEBUG::DebugReport_Warning, and PrintLog().

Here is the call graph for this function:

void DEBUG::DebugReportInfo::PrintError ( const char *  message,
  ... 
)

Makes a call to the DebugReportInfo::PrintLog() function with the DEBUG::DebugReport_Error severity level.

Parameters:
message is the message to be reported. This is a printf-style C-string.

Definition at line 65 of file DebugReport.cpp.

References DEBUG::DebugReport_Error, and PrintLog().

Here is the call graph for this function:

void DEBUG::DebugReportInfo::PrintFatal ( const char *  message,
  ... 
)

Makes a call to the DebugReportInfo::PrintLog() function with the DEBUG::DebugReport_Fatal severity level.

Parameters:
message is the message to be reported. This is a printf-style C-string.

Definition at line 75 of file DebugReport.cpp.

References DEBUG::DebugReport_Fatal, and PrintLog().

Here is the call graph for this function:

void DEBUG::DebugReportInfo::PrintMessage ( const char *  message,
  ... 
)

Makes a call to the DebugReportInfo::PrintLog() function with the DEBUG::DebugReport_Message severity level.

Parameters:
message is the message to be reported. This is a printf-style C-string.

Definition at line 85 of file DebugReport.cpp.

References DEBUG::DebugReport_Message, and PrintLog().

Here is the call graph for this function:

void DEBUG::DebugReportInfo::PrintSimpleMessage ( const char *  message,
  ... 
)

Makes a call to the DebugReportInfo::PrintLog() function with the DEBUG::DebugReport_SimpleMessage severity level.

Parameters:
message is the message to be reported. This is a printf-style C-string.

Definition at line 95 of file DebugReport.cpp.

References DEBUG::DBGREP_MAX_REPORT_LENGTH, DEBUG::DebugReport_SimpleMessage, func_, and DEBUG::DebugReport::Log().

Here is the call graph for this function:

const DebugReportInfo& DEBUG::DebugReportInfo::operator= ( const DebugReportInfo rhs  )  [private]

hidden assignment operator


Member Data Documentation

const char* DEBUG::DebugReportInfo::func_ [private]

The name of the Function that the report is being made from. Usually the value of __PRETTY_FUNCTION__ or __func__.

Definition at line 131 of file DebugReport.h.

Referenced by PrintLog(), and PrintSimpleMessage().

const char* DEBUG::DebugReportInfo::file_ [private]

The name of the File that the report is being made in. Usually the value of __FILE__.

Definition at line 134 of file DebugReport.h.

Referenced by PrintLog().

The line number that the report is being made on. This is almost always __LINE__.

Definition at line 137 of file DebugReport.h.

Referenced by PrintLog().


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

Generated on Tue Mar 3 20:11:36 2009 for ged101minimal by  doxygen 1.5.5