OsirixParserErrorHandler Class Reference

#include <OsirixParser.h>

List of all members.

Public Member Functions

 OsirixParserErrorHandler ()
 ~OsirixParserErrorHandler ()
virtual void warning (const SAXParseException &exc)
virtual void error (const SAXParseException &exc)
virtual void fatalError (const SAXParseException &exc)
virtual void resetErrors ()
std::string getErrorMsg ()

Private Attributes

std::string errormsg


Detailed Description

Definition at line 148 of file OsirixParser.h.


Constructor & Destructor Documentation

OsirixParserErrorHandler::OsirixParserErrorHandler (  ) 

Default Constructor

The Error Handler's interface implementation Default Constructor

Definition at line 474 of file OsirixParser.cxx.

00475 : ErrorHandler(){
00476 
00477 
00478 
00479 
00480 }

OsirixParserErrorHandler::~OsirixParserErrorHandler (  ) 

Desctructor by defect

Definition at line 484 of file OsirixParser.cxx.

00484                                                    {
00485 }


Member Function Documentation

void OsirixParserErrorHandler::error ( const SAXParseException &  exc  )  [virtual]

Definition at line 490 of file OsirixParser.cxx.

References errormsg.

00490                                                                     {
00491         char c[1000];
00492         errormsg = "Column ";
00493 //      errormsg +=     itoa(exc.getColumnNumber(),c,10);
00494 #ifdef WIN32
00495         sprintf_s(c,"%d",(int)(exc.getColumnNumber()));
00496 #else
00497         sprintf(c,"%d",(int)(exc.getColumnNumber()));
00498 #endif
00499         errormsg +=     std::string(c);
00500 
00501         errormsg += " Line ";
00502 //      errormsg +=     itoa(exc.getLineNumber(),c,10);
00503 #ifdef WIN32
00504         sprintf_s(c,"%d",(int)(exc.getLineNumber()));
00505 #else
00506         sprintf(c,"%d",(int)(exc.getLineNumber()));
00507 #endif
00508         errormsg +=     std::string(c);
00509 
00510         errormsg += " ";
00511         errormsg += XMLString::transcode(exc.getMessage());
00512 
00513 }

void OsirixParserErrorHandler::fatalError ( const SAXParseException &  exc  )  [virtual]

Definition at line 515 of file OsirixParser.cxx.

References errormsg.

00515                                                                          {
00516         char c[1000];
00517         errormsg = "Column ";
00518 //      errormsg +=     itoa(exc.getColumnNumber(),c,10);
00519 #ifdef WIN32
00520         sprintf_s(c,"%d",(int)(exc.getColumnNumber()));
00521 #else
00522         sprintf(c,"%d",(int)(exc.getColumnNumber()));
00523 #endif
00524         errormsg +=     std::string(c);
00525 
00526         errormsg += " Line ";
00527 //      errormsg +=     itoa(exc.getLineNumber(),c,10);
00528 #ifdef WIN32
00529         sprintf_s(c,"%d",(int)(exc.getLineNumber()));
00530 #else
00531         sprintf(c,"%d",(int)(exc.getLineNumber()));
00532 #endif
00533         errormsg +=     std::string(c);
00534 
00535         errormsg += " ";
00536         errormsg += XMLString::transcode(exc.getMessage());
00537 }

std::string OsirixParserErrorHandler::getErrorMsg (  ) 

Definition at line 542 of file OsirixParser.cxx.

References errormsg.

00542                                                {
00543         return this->errormsg;
00544 }

void OsirixParserErrorHandler::resetErrors (  )  [virtual]

Definition at line 539 of file OsirixParser.cxx.

00539                                               {
00540 }

void OsirixParserErrorHandler::warning ( const SAXParseException &  exc  )  [virtual]

Definition at line 487 of file OsirixParser.cxx.

00487                                                                       {
00488 }


Member Data Documentation

std::string OsirixParserErrorHandler::errormsg [private]

Definition at line 177 of file OsirixParser.h.

Referenced by error(), fatalError(), and getErrorMsg().


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

Generated on Wed Jun 27 23:28:34 2012 for creaContours_lib by  doxygen 1.5.7.1