Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

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 Methods

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

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 11 of file Print_Handler.cpp.

References ACEXML_Char.

00012   : fileName_(ACE::strnew (fileName))
00013 {
00014 
00015 }

ACEXML_Print_Handler::~ACEXML_Print_Handler void    [virtual]
 

Definition at line 17 of file Print_Handler.cpp.

References fileName_.

00018 {
00019   delete[] this->fileName_;
00020 }


Member Function Documentation

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

Receive notification of character data.

Reimplemented from ACEXML_DefaultHandler.

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 36 of file Print_Handler.cpp.

References ACE_DEBUG, ACE_TEXT, ACEXML_ENV_SINGLE_ARG_DECL_NOT_USED, and LM_DEBUG.

00038 {
00039 
00040 
00041   ACE_DEBUG ((LM_DEBUG,
00042               ACE_TEXT ("* Event endDocument () ***************\n")));
00043 }

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 46 of file Print_Handler.cpp.

References ACE_DEBUG, ACE_TEXT, ACEXML_Char, ACEXML_ENV_ARG_DECL_NOT_USED, and LM_DEBUG.

00051 {
00052 
00053 
00054   ACE_DEBUG ((LM_DEBUG,
00055               ACE_TEXT ("* Event endElement (%s, %s, %s) ***************\n"),
00056               uri, name, qName));
00057 }

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 60 of file Print_Handler.cpp.

References ACE_DEBUG, ACE_TEXT, ACEXML_Char, ACEXML_ENV_ARG_DECL_NOT_USED, and LM_DEBUG.

00063 {
00064 
00065 
00066   ACE_DEBUG ((LM_DEBUG,
00067               ACE_TEXT ("* Event endPrefixMapping (%s) ***************\n"),
00068               prefix));
00069 }

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.

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.

Definition at line 72 of file Print_Handler.cpp.

References ACE_DEBUG, ACE_TEXT, ACEXML_Char, ACEXML_ENV_ARG_DECL_NOT_USED, and LM_DEBUG.

00077 {
00078 
00079 
00080   ACE_DEBUG ((LM_DEBUG,
00081               ACE_TEXT ("* Event ignorableWhitespace () ***************\n")));
00082 }

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 85 of file Print_Handler.cpp.

References ACE_DEBUG, ACE_TEXT, ACEXML_Char, ACEXML_ENV_ARG_DECL_NOT_USED, and LM_DEBUG.

00089 {
00090 
00091 
00092   ACE_DEBUG ((LM_DEBUG,
00093               ACE_TEXT ("* Event processingInstruction (%s, %s) ***************\n"),
00094               target, data));
00095 }

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 98 of file Print_Handler.cpp.

References ACE_DEBUG, ACE_TEXT, LM_DEBUG, and locator_.

00099 {
00100 
00101   this->locator_ = locator;
00102   ACE_DEBUG ((LM_DEBUG,
00103               ACE_TEXT ("* Event setDocumentLocator () ***************\n")));
00104 }

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 107 of file Print_Handler.cpp.

References ACE_DEBUG, ACE_TEXT, ACEXML_Char, ACEXML_ENV_ARG_DECL_NOT_USED, and LM_DEBUG.

00110 {
00111 
00112 
00113   ACE_DEBUG ((LM_DEBUG,
00114               ACE_TEXT ("* Event skippedEntity (%s) ***************\n"),
00115               name));
00116 }

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 119 of file Print_Handler.cpp.

References ACE_DEBUG, ACE_TEXT, ACEXML_ENV_SINGLE_ARG_DECL_NOT_USED, and LM_DEBUG.

00121 {
00122 
00123 
00124   ACE_DEBUG ((LM_DEBUG,
00125               ACE_TEXT ("* Event startDocument () ***************\n")));
00126 }

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 152 of file Print_Handler.cpp.

References ACE_DEBUG, ACE_TEXT, ACEXML_Char, ACEXML_ENV_ARG_DECL_NOT_USED, and LM_DEBUG.

00155 {
00156   ACE_DEBUG ((LM_DEBUG,
00157               ACE_TEXT ("* Event startPrefixMapping () ***************\n")));
00158   ACE_DEBUG ((LM_DEBUG,
00159               ACE_TEXT ("Prefix = %s, URI = %s\n"), prefix, uri));
00160 }

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 189 of file Print_Handler.cpp.

References ACE_DEBUG, ACE_TEXT, ACEXML_Char, ACEXML_ENV_ARG_DECL_NOT_USED, and LM_DEBUG.

00194 {
00195   ACE_DEBUG ((LM_DEBUG,
00196               ACE_TEXT ("* Unparsed Entity: %s"),
00197               name));
00198 
00199   if (publicID == 0)
00200     ACE_DEBUG ((LM_DEBUG,
00201                 ACE_TEXT (" SYSTEM %s"),
00202                 systemID));
00203   else
00204     ACE_DEBUG ((LM_DEBUG,
00205                 ACE_TEXT (" PUBLIC %s %s"),
00206                 publicID, systemID));
00207 
00208   ACE_DEBUG ((LM_DEBUG,
00209               ACE_TEXT (" NDATA %s\n"),
00210               notationName));
00211 }

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 182 of file Print_Handler.h.

Referenced by ~ACEXML_Print_Handler.

ACEXML_Locator* ACEXML_Print_Handler::locator_ [private]
 

Definition at line 183 of file Print_Handler.h.

Referenced by setDocumentLocator.


The documentation for this class was generated from the following files:
Generated on Mon Jun 16 13:27:24 2003 for ACEXML by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002