#ifndef BALERRORS_H #define BALERRORS_H // balerrors.h Hold commands for writing to error report files /******************************************************************************* // MODULE NAME: BALerrors // INTERFACE FILE: balerrors.h // IMPLEMENTATION FILE: balerrors.cpp // // PURPOSE: To provide a set of functions useful in an implementation of the BAL // program which allows a client to produce a BAC-formatted error report by // reporting label or data errors and delimiter lines for formatting // // FUNCTIONS: Name Purpose // WriteSectionHeader Indicate which section is being parsed // WriteLabelError Report an incorrect label & its location // WriteDataError Report an incorrect data value & its location // WriteNoErrors Indicate no errors were found in the section // WriteSectionFooter Print section-delimiting lines // // AUTHOR: Amy Langill *2B DATE: 2/22/1999 // REVISED: 3/22/1999 *******************************************************************************/ #include // For ofstreams #include // For strings & string functions #include // For setw() #include "errortype.h" // For DataErrorType #include "sectiontype.h" // For BALSectionType using namespace std; // Function prototypes // Write the section header at the top void WriteSectionHeader(ofstream& File,string Name,BALSectionType section); // Report a problem with a label void WriteLabelError(ofstream& File,bool otherErrors,string badLabel, string goodLabel,int record,int line); // Report a problem in a field void WriteDataError(ofstream& File,DataErrorType whatsWrong,bool otherErrors, string badData,string Label,int record,int line); // Indicate that there were no errors in a section void WriteNoErrors(ofstream& File); // Show that the end of a section was reached void WriteSectionFooter(ofstream& File); #endif