- Main Page
- Namespaces
- Classes
- Files
- Related Pages

# /Users/fpy/titan-1-5-MBARI/Mers/Utils/Io/Xml/Sax/ContentHandler.h

    00001
    00002 //
    00003 // Copyright (c) 2005           Model-based Embedded and Robotic Systems Group
    00004 // All Rights Reserved          Massachusetts Institute of Technology
    00005 //
    00006 // This software is provided as is. Model-based Embedded and Robotic Systems
    00007 // (MERS) group does not assume any responsibility.
    00008 //
    00010
    00011 #ifndef MERS_UTILS_IO_XML_SAX_CONTENTHANDLER_HEADER_FILE
    00012 #define MERS_UTILS_IO_XML_SAX_CONTENTHANDLER_HEADER_FILE
    00013
    00014 #include <xercesc/sax2/ContentHandler.hpp>
    00015 #include <Mers/Utils/Logging/logger.h>
    00016
    00017 XERCES_CPP_NAMESPACE_BEGIN
    00018 class SAX2XMLReader;
    00019 XERCES_CPP_NAMESPACE_END
    00020
    00021 namespace Mers {
    00022         namespace Utils {
    00023                 namespace Lang {
    00024                         class String;
    00025                 }
    00026                 namespace Io {
    00027                         namespace Xml {
    00028                                 namespace Sax {
    00034                                         class ContentHandler :
    00035                                                 public XERCES_CPP_NAMESPACE::ContentHandler
    00036                                         {
    00037                                         public:
    00047                                                 ContentHandler( XERCES_CPP_NAMESPACE::SAX2XMLReader * reader,
    00048                                                         ::Mers::Utils::Io::Xml::Sax::ContentHandler * parent
    00049                                                                 = NULL );
    00050
    00054                                                 virtual ~ContentHandler();
    00055
    00088                                                 virtual void characters(
    00089                                                         const XMLCh * const chars,
    00090                                                         const unsigned int length);
    00091
    00104                                                 virtual void endDocument();
    00105
    00124                                                 virtual void endElement(
    00125                                                         const XMLCh * const uri,
    00126                                                         const XMLCh * const localname,
    00127                                                         const XMLCh * const qname);
    00128
    00156                                                 virtual void ignorableWhitespace(
    00157                                                         const XMLCh * const chars,
    00158                                                         const unsigned int length);
    00159
    00180                                                 virtual void processingInstruction(
    00181                                                         const XMLCh * const target,
    00182                                                         const XMLCh * const data);
    00183
    00215                                                 virtual void setDocumentLocator(
    00216                                                         const XERCES_CPP_NAMESPACE::Locator* const locator);
    00217
    00228                                                 virtual void startDocument();
    00229
    00260                                                 virtual void startElement(
    00261                                                         const XMLCh * const uri,
    00262                                                         const XMLCh * const localname,
    00263                                                         const XMLCh * const qname,
    00264                                                         const XERCES_CPP_NAMESPACE::Attributes& attrs);
    00265
    00282                                                 virtual void startPrefixMapping(
    00283                                                         const XMLCh * const prefix,
    00284                                                         const XMLCh * const uri);
    00285
    00300                                                 virtual void endPrefixMapping(
    00301                                                         const   XMLCh * const prefix);
    00302
    00327                                                 virtual void skippedEntity(
    00328                                                         const XMLCh * const name);
    00329
    00331
    00332                                         protected:
    00341                                                 const XERCES_CPP_NAMESPACE::Locator *
    00342                                                 getDocumentLocator() const {
    00343                                                         if( m_locator == NULL && m_Parent != NULL )
    00344                                                                 return m_Parent->getDocumentLocator();
    00345                                                         return m_locator;
    00346                                                 }
    00347
    00352                                                 ::Mers::Utils::Lang::String
    00353                                                 getLineNumberString() const;
    00354
    00355                                         protected:
    00357                                                 XERCES_CPP_NAMESPACE::SAX2XMLReader * m_Reader;
    00358
    00361                                                 ::Mers::Utils::Io::Xml::Sax::ContentHandler * m_Parent;
    00362
    00364                                                 static log4cplus::Logger m_Logger;
    00365
    00366                                         private:
    00369                                                 const XERCES_CPP_NAMESPACE::Locator * m_locator;
    00370                                         };
    00371                                 }
    00372                         }
    00373                 }
    00374         }
    00375 }
    00376
    00377 #endif
    00378