Hauptseite | Liste aller Namensbereiche | Klassenhierarchie | Übersicht | Auflistung der Dateien | Elemente eines Namensbereiches | Datenstruktur-Elemente | Datei-Elemente

ConfigSax2ContentHandler.hpp

gehe zur Dokumentation dieser Datei
00001 #ifndef BOERN_CONFIG_SAX2_CONTENT_HANDLER_HPP
00002 #define BOERN_CONFIG_SAX2_CONTENT_HANDLER_HPP
00003 // Copyright (C) 2004 Bernhard Assmann <bernie@tuxomania.net>
00004 //  
00005 // This program is free software; you can redistribute it and/or modify
00006 // it under the terms of the GNU General Public License as published by
00007 // the Free Software Foundation; either version 2 of the License, or
00008 // (at your option) any later version.
00009 //  
00010 // This program is distributed in the hope that it will be useful,
00011 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013 // GNU General Public License for more details.
00014 //  
00015 // You should have received a copy of the GNU General Public License
00016 // along with this program; if not, write to the Free Software
00017 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
00018 //  
00019 
00020 #include <xercesc/sax2/Attributes.hpp>
00021 #include <xercesc/sax2/ContentHandler.hpp>
00022 
00023 #include <string>
00024 #include <map>
00025 
00026 namespace psfa 
00027 {
00028 
00035   class ConfigSax2ContentHandler : public xercesc::ContentHandler
00036   {
00037   public:
00043     ConfigSax2ContentHandler( std::map< std::string, std::string >& data );
00044   
00045     virtual void 
00046     characters( const XMLCh* const chars,
00047       const unsigned int length );
00048   
00049     virtual void 
00050     endDocument();
00051   
00052     virtual void 
00053     endElement( const XMLCh* const uri,
00054       const XMLCh* const localname,
00055       const XMLCh* const qname );
00056   
00057     virtual void 
00058     ignorableWhitespace( const XMLCh* const chars,
00059           const unsigned int length );
00060     
00061     virtual void 
00062     processingInstruction( const XMLCh* const target,
00063             const XMLCh* const data );
00064     
00065     virtual void 
00066     setDocumentLocator (const xercesc::Locator* locator );
00067     
00068     virtual void 
00069     startDocument();
00070     
00071     virtual void 
00072     startElement( const XMLCh* const uri,
00073         const XMLCh* const localname,
00074         const XMLCh* const qname,
00075         const xercesc::Attributes& attrs );
00076     
00077     virtual void 
00078     startPrefixMapping( const XMLCh* const prefix,
00079          const XMLCh* const uri );
00080   
00081     virtual void
00082     endPrefixMapping( const XMLCh* const prefix );
00083     
00084     
00085     virtual void 
00086     skippedEntity( const XMLCh* const name );
00087     
00088   private:
00093     enum Mode { start,     
00094       poolName,   
00095       key,     
00096       value    
00097     };
00098 
00099     Mode mode_;         
00101     std::map< std::string, std::string >& data_; 
00105     std::string pool_;     
00107     std::string key_;      
00108   };
00109 }
00110 #endif

Erzeugt am Mon Jul 12 11:45:04 2004 für PSFA von doxygen 1.3.4