ACEXML_Print_Handler Class Reference

ACEXML_Print_Handler is an example SAX event handler. More...

#include <Print_Handler.h>

Inheritance diagram for ACEXML_Print_Handler:

Inheritance graph
[legend]
Collaboration diagram for ACEXML_Print_Handler:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ACEXML_Print_Handler (ACEXML_Char *fileName)
virtual ~ACEXML_Print_Handler (void)
virtual void characters (const ACEXML_Char *ch, size_t start, size_t length ACEXML_ENV_ARG_DECL)
virtual void endDocument (ACEXML_ENV_SINGLE_ARG_DECL)
virtual void endElement (const ACEXML_Char *namespaceURI, const ACEXML_Char *localName, const ACEXML_Char *qName ACEXML_ENV_ARG_DECL)
virtual void endPrefixMapping (const ACEXML_Char *prefix ACEXML_ENV_ARG_DECL)
virtual void ignorableWhitespace (const ACEXML_Char *ch, int start, int length ACEXML_ENV_ARG_DECL)
virtual void processingInstruction (const ACEXML_Char *target, const ACEXML_Char *data ACEXML_ENV_ARG_DECL)
virtual void setDocumentLocator (ACEXML_Locator *locator)
virtual void skippedEntity (const ACEXML_Char *name ACEXML_ENV_ARG_DECL)
virtual void startDocument (ACEXML_ENV_SINGLE_ARG_DECL)
virtual void startElement (const ACEXML_Char *namespaceURI, const ACEXML_Char *localName, const ACEXML_Char *qName, ACEXML_Attributes *atts ACEXML_ENV_ARG_DECL)
virtual void startPrefixMapping (const ACEXML_Char *prefix, const ACEXML_Char *uri ACEXML_ENV_ARG_DECL)
virtual void notationDecl (const ACEXML_Char *name, const ACEXML_Char *publicId, const ACEXML_Char *systemId ACEXML_ENV_ARG_DECL)
virtual void unparsedEntityDecl (const ACEXML_Char *name, const ACEXML_Char *publicId, const ACEXML_Char *systemId, const ACEXML_Char *notationName ACEXML_ENV_ARG_DECL)
virtual ACEXML_InputSourceresolveEntity (const ACEXML_Char *publicId, const ACEXML_Char *systemId ACEXML_ENV_ARG_DECL)
virtual void error (ACEXML_SAXParseException &exception ACEXML_ENV_ARG_DECL)
virtual void fatalError (ACEXML_SAXParseException &exception ACEXML_ENV_ARG_DECL)
virtual void warning (ACEXML_SAXParseException &exception ACEXML_ENV_ARG_DECL)

Private Attributes

ACEXML_CharfileName_
ACEXML_Locatorlocator_

Detailed Description

ACEXML_Print_Handler is an example SAX event handler.

This SAX event handler prints out a detailed event report on every event it receives.

Definition at line 26 of file Print_Handler.h.


Constructor & Destructor Documentation

ACEXML_Print_Handler::ACEXML_Print_Handler ACEXML_Char fileName  ) 
 

Definition at line 7 of file Print_Handler.cpp.

References ACEXML_Char.

00008   : fileName_(ACE::strnew (fileName))
00009 {
00010 
00011 }

ACEXML_Print_Handler::~ACEXML_Print_Handler void   )  [virtual]
 

Definition at line 13 of file Print_Handler.cpp.

References fileName_.

00014 {
00015   delete[] this->fileName_;
00016 }


Member Function Documentation

void ACEXML_Print_Handler::characters const ACEXML_Char ch,
size_t  start,
size_t length  ACEXML_ENV_ARG_DECL
[virtual]
 

Receive notification of character data.

Reimplemented from ACEXML_DefaultHandler.

Definition at line 19 of file Print_Handler.cpp.

References ACE_DEBUG, ACE_TEXT, ACEXML_Char, and LM_DEBUG.

00022 {
00023 
00024 
00025   ACE_DEBUG ((LM_DEBUG,
00026               ACE_TEXT ("* Event characters () ** start: %u  end: %u ***************\n%s\n- End event characters () ---------------\n"),
00027               start, length, cdata));
00028 }

void ACEXML_Print_Handler::endDocument ACEXML_ENV_SINGLE_ARG_DECL   )  [virtual]
 

Receive notification of the end of a document.

Reimplemented from ACEXML_DefaultHandler.

Definition at line 31 of file Print_Handler.cpp.

References ACE_DEBUG, ACE_TEXT, and LM_DEBUG.

00032 {
00033 
00034 
00035   ACE_DEBUG ((LM_DEBUG,
00036               ACE_TEXT ("* Event endDocument () ***************\n")));
00037 }

void ACEXML_Print_Handler::endElement const ACEXML_Char namespaceURI,
const ACEXML_Char localName,
const ACEXML_Char *qName  ACEXML_ENV_ARG_DECL
[virtual]
 

Receive notification of the end of an element.

Reimplemented from ACEXML_DefaultHandler.

Definition at line 40 of file Print_Handler.cpp.

References ACE_DEBUG, ACE_TEXT, ACEXML_Char, and LM_DEBUG.

00044 {
00045 
00046 
00047   ACE_DEBUG ((LM_DEBUG,
00048               ACE_TEXT ("* Event endElement (%s, %s, %s) ***************\n"),
00049               uri, name, qName));
00050 }

void ACEXML_Print_Handler::endPrefixMapping const ACEXML_Char *prefix  ACEXML_ENV_ARG_DECL  )  [virtual]
 

End the scope of a prefix-URI mapping.

Reimplemented from ACEXML_DefaultHandler.

Definition at line 53 of file Print_Handler.cpp.

References ACE_DEBUG, ACE_TEXT, ACEXML_Char, and LM_DEBUG.

00055 {
00056 
00057 
00058   ACE_DEBUG ((LM_DEBUG,
00059               ACE_TEXT ("* Event endPrefixMapping (%s) ***************\n"),
00060               prefix));
00061 }

virtual void ACEXML_Print_Handler::error ACEXML_SAXParseException &exception  ACEXML_ENV_ARG_DECL  )  [virtual]
 

Receive notification of a recoverable error.

Reimplemented from ACEXML_DefaultHandler.

virtual void ACEXML_Print_Handler::fatalError ACEXML_SAXParseException &exception  ACEXML_ENV_ARG_DECL  )  [virtual]
 

Receive notification of a non-recoverable error.

Reimplemented from ACEXML_DefaultHandler.

virtual void ACEXML_Print_Handler::ignorableWhitespace const ACEXML_Char ch,
int  start,
int length  ACEXML_ENV_ARG_DECL
[virtual]
 

Receive notification of ignorable whitespace in element content.

Reimplemented from ACEXML_DefaultHandler.

virtual void ACEXML_Print_Handler::notationDecl const ACEXML_Char name,
const ACEXML_Char publicId,
const ACEXML_Char *systemId  ACEXML_ENV_ARG_DECL
[virtual]
 

Receive notification of a notation declaration event.

Reimplemented from ACEXML_DefaultHandler.

void ACEXML_Print_Handler::processingInstruction const ACEXML_Char target,
const ACEXML_Char *data  ACEXML_ENV_ARG_DECL
[virtual]
 

Receive notification of a processing instruction.

Reimplemented from ACEXML_DefaultHandler.

Definition at line 74 of file Print_Handler.cpp.

References ACE_DEBUG, ACE_TEXT, ACEXML_Char, and LM_DEBUG.

00077 {
00078 
00079 
00080   ACE_DEBUG ((LM_DEBUG,
00081               ACE_TEXT ("* Event processingInstruction (%s, %s) ***************\n"),
00082               target, data));
00083 }

virtual ACEXML_InputSource* ACEXML_Print_Handler::resolveEntity const ACEXML_Char publicId,
const ACEXML_Char *systemId  ACEXML_ENV_ARG_DECL
[virtual]
 

Allow the application to resolve external entities.

Reimplemented from ACEXML_DefaultHandler.

void ACEXML_Print_Handler::setDocumentLocator ACEXML_Locator locator  )  [virtual]
 

Receive an object for locating the origin of SAX document events.

Reimplemented from ACEXML_DefaultHandler.

Definition at line 86 of file Print_Handler.cpp.

00087 {
00088 
00089   this->locator_ = locator;
00090   // ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("* Event setDocumentLocator () ***************\n")));
00091 }

void ACEXML_Print_Handler::skippedEntity const ACEXML_Char *name  ACEXML_ENV_ARG_DECL  )  [virtual]
 

Receive notification of a skipped entity.

Reimplemented from ACEXML_DefaultHandler.

Definition at line 94 of file Print_Handler.cpp.

References ACE_DEBUG, ACE_TEXT, ACEXML_Char, and LM_DEBUG.

00096 {
00097 
00098 
00099   ACE_DEBUG ((LM_DEBUG,
00100               ACE_TEXT ("* Event skippedEntity (%s) ***************\n"),
00101               name));
00102 }

void ACEXML_Print_Handler::startDocument ACEXML_ENV_SINGLE_ARG_DECL   )  [virtual]
 

Receive notification of the beginning of a document.

Reimplemented from ACEXML_DefaultHandler.

Definition at line 105 of file Print_Handler.cpp.

References ACE_DEBUG, ACE_TEXT, and LM_DEBUG.

00106 {
00107 
00108 
00109   ACE_DEBUG ((LM_DEBUG,
00110               ACE_TEXT ("* Event startDocument () ***************\n")));
00111 }

virtual void ACEXML_Print_Handler::startElement const ACEXML_Char namespaceURI,
const ACEXML_Char localName,
const ACEXML_Char qName,
ACEXML_Attributes *atts  ACEXML_ENV_ARG_DECL
[virtual]
 

Receive notification of the beginning of an element.

Reimplemented from ACEXML_DefaultHandler.

void ACEXML_Print_Handler::startPrefixMapping const ACEXML_Char prefix,
const ACEXML_Char *uri  ACEXML_ENV_ARG_DECL
[virtual]
 

Begin the scope of a prefix-URI Namespace mapping.

Reimplemented from ACEXML_DefaultHandler.

Definition at line 136 of file Print_Handler.cpp.

References ACE_DEBUG, ACE_TEXT, ACEXML_Char, and LM_DEBUG.

00138 {
00139   ACE_DEBUG ((LM_DEBUG,
00140               ACE_TEXT ("* Event startPrefixMapping () ***************\n")));
00141   ACE_DEBUG ((LM_DEBUG,
00142               ACE_TEXT ("Prefix = %s, URI = %s\n"), prefix, uri));
00143 }

void ACEXML_Print_Handler::unparsedEntityDecl const ACEXML_Char name,
const ACEXML_Char publicId,
const ACEXML_Char systemId,
const ACEXML_Char *notationName  ACEXML_ENV_ARG_DECL
[virtual]
 

Receive notification of an unparsed entity declaration event.

Reimplemented from ACEXML_DefaultHandler.

Definition at line 171 of file Print_Handler.cpp.

References ACE_DEBUG, ACE_TEXT, ACEXML_Char, and LM_DEBUG.

00175 {
00176   ACE_DEBUG ((LM_DEBUG,
00177               ACE_TEXT ("* Unparsed Entity: %s"),
00178               name));
00179 
00180   if (publicID == 0)
00181     ACE_DEBUG ((LM_DEBUG,
00182                 ACE_TEXT (" SYSTEM %s"),
00183                 systemID));
00184   else
00185     ACE_DEBUG ((LM_DEBUG,
00186                 ACE_TEXT (" PUBLIC %s %s"),
00187                 publicID, systemID));
00188 
00189   ACE_DEBUG ((LM_DEBUG,
00190               ACE_TEXT (" NDATA %s\n"),
00191               notationName));
00192 }

virtual void ACEXML_Print_Handler::warning ACEXML_SAXParseException &exception  ACEXML_ENV_ARG_DECL  )  [virtual]
 

Receive notification of a warning.

Reimplemented from ACEXML_DefaultHandler.


Member Data Documentation

ACEXML_Char* ACEXML_Print_Handler::fileName_ [private]
 

Definition at line 166 of file Print_Handler.h.

Referenced by ~ACEXML_Print_Handler().

ACEXML_Locator* ACEXML_Print_Handler::locator_ [private]
 

Definition at line 167 of file Print_Handler.h.


The documentation for this class was generated from the following files:
Generated on Sun Jan 27 13:05:06 2008 for ACEXML by doxygen 1.3.6