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

psfa::ConfigSax2ContentHandler Klassenreferenz

Der Sax2-Content-Handler der Konfiguration. Mehr...

#include <psfa/ConfigSax2ContentHandler.hpp>

Aufstellung aller Elemente

Öffentliche Methoden

 ConfigSax2ContentHandler (std::map< std::string, std::string > &data)
virtual void characters (const XMLCh *const chars, const unsigned int length)
virtual void endDocument ()
virtual void endElement (const XMLCh *const uri, const XMLCh *const localname, const XMLCh *const qname)
virtual void ignorableWhitespace (const XMLCh *const chars, const unsigned int length)
virtual void processingInstruction (const XMLCh *const target, const XMLCh *const data)
virtual void setDocumentLocator (const xercesc::Locator *locator)
virtual void startDocument ()
virtual void startElement (const XMLCh *const uri, const XMLCh *const localname, const XMLCh *const qname, const xercesc::Attributes &attrs)
virtual void startPrefixMapping (const XMLCh *const prefix, const XMLCh *const uri)
virtual void endPrefixMapping (const XMLCh *const prefix)
virtual void skippedEntity (const XMLCh *const name)

Private Typen

enum  Mode { start, poolName, key, value }
 Der interne Zustand. Mehr...


Private Attribute

Mode mode_
 Das interne Zustandsobjekt.

std::map< std::string, std::string > & data_
 Die Referenz auf den Container für die Konfiguration.

std::string pool_
 Der aktuelle Pool.

std::string key_
 Der aktuelle Schlüssel.


Ausführliche Beschreibung

Der Sax2-Content-Handler der Konfiguration.

Definiert in Zeile 35 der Datei ConfigSax2ContentHandler.hpp.


Dokumentation der Aufzählungstypen

enum psfa::ConfigSax2ContentHandler::Mode [private]
 

Der interne Zustand.

Aufzählungswerte:
start  Start.
poolName  Es wird der Name eines Pools erwartet.
key  Es wird ein Schlüssel erwartet.
value  Es wird ein Wert erwartet.

Definiert in Zeile 93 der Datei ConfigSax2ContentHandler.hpp.

00093               { start,     
00094       poolName,   
00095       key,     
00096       value    
00097     };


Beschreibung der Konstruktoren und Destruktoren

psfa::ConfigSax2ContentHandler::ConfigSax2ContentHandler std::map< std::string, std::string > &  data  ) 
 

Parameter:
data der Container zum Speichern der Konfiguration

Definiert in Zeile 29 der Datei ConfigSax2ContentHandler.cpp.

00032   : mode_(start),
00033     data_(data),
00034     pool_(""),
00035     key_("")
00036 {
00037   
00038 }


Dokumentation der Elementfunktionen

void psfa::ConfigSax2ContentHandler::characters const XMLCh *const   chars,
const unsigned int  length
[virtual]
 

Definiert in Zeile 43 der Datei ConfigSax2ContentHandler.cpp.

Benutzt data_, key, key_, mode_, pool_, poolName, psfahelper::stripWhiteSpace(), value und XMLCh.

00045 {
00046   using psfahelper::stripWhiteSpace;
00047   
00048   std::string tmp( chars, chars + length );
00049   tmp = stripWhiteSpace(tmp);
00050   if( tmp == "" ) {
00051     return;
00052   }
00053   switch( mode_ ) {
00054   case poolName:
00055     pool_ = tmp;
00056     break;
00057   case key:
00058     key_ = pool_ + "_" + tmp;
00059     break;
00060   case value:
00061     {
00062       typedef std::map< std::string, std::string > cMap;
00063       cMap::value_type i( key_, tmp );
00064       data_.insert( i );
00065     }
00066     break;
00067   default:
00068     break;
00069   }
00070   return;
00071 }

void psfa::ConfigSax2ContentHandler::endDocument  )  [virtual]
 

Definiert in Zeile 76 der Datei ConfigSax2ContentHandler.cpp.

00077 {
00078 
00079 }

void psfa::ConfigSax2ContentHandler::endElement const XMLCh *const   uri,
const XMLCh *const   localname,
const XMLCh *const   qname
[virtual]
 

Definiert in Zeile 84 der Datei ConfigSax2ContentHandler.cpp.

Benutzt XMLCh.

00087 {
00088 
00089 }

void psfa::ConfigSax2ContentHandler::endPrefixMapping const XMLCh *const   prefix  )  [virtual]
 

Definiert in Zeile 163 der Datei ConfigSax2ContentHandler.cpp.

Benutzt XMLCh.

00164 {
00165     
00166     
00167 }

void psfa::ConfigSax2ContentHandler::ignorableWhitespace const XMLCh *const   chars,
const unsigned int  length
[virtual]
 

Definiert in Zeile 94 der Datei ConfigSax2ContentHandler.cpp.

Benutzt XMLCh.

00096 {
00097 
00098 }

void psfa::ConfigSax2ContentHandler::processingInstruction const XMLCh *const   target,
const XMLCh *const   data
[virtual]
 

Definiert in Zeile 103 der Datei ConfigSax2ContentHandler.cpp.

Benutzt XMLCh.

00105 {
00106     
00107 }

void psfa::ConfigSax2ContentHandler::setDocumentLocator const xercesc::Locator *  locator  )  [virtual]
 

Definiert in Zeile 112 der Datei ConfigSax2ContentHandler.cpp.

00113 {
00114 
00115 }

void psfa::ConfigSax2ContentHandler::skippedEntity const XMLCh *const   name  )  [virtual]
 

Definiert in Zeile 172 der Datei ConfigSax2ContentHandler.cpp.

Benutzt XMLCh.

00173 {
00174     
00175 }

void psfa::ConfigSax2ContentHandler::startDocument  )  [virtual]
 

Definiert in Zeile 120 der Datei ConfigSax2ContentHandler.cpp.

00121 {
00122     
00123 }

void psfa::ConfigSax2ContentHandler::startElement const XMLCh *const   uri,
const XMLCh *const   localname,
const XMLCh *const   qname,
const xercesc::Attributes &  attrs
[virtual]
 

Definiert in Zeile 128 der Datei ConfigSax2ContentHandler.cpp.

Benutzt psfahelper::getXMLChLength(), key, mode_, poolName, value und XMLCh.

00132 {
00133   using psfahelper::getXMLChLength;
00134   using std::string;
00135   
00136   const string::size_type s = getXMLChLength( qname );
00137   const string tag( qname, qname + s );
00138 
00139   if( tag == "name" ) {
00140     mode_ = poolName;
00141   }
00142   else if ( tag == "key" ) {
00143     mode_ = key;
00144   }
00145   else if ( tag == "value" ) {
00146     mode_ = value;
00147   }
00148   return;
00149 }

void psfa::ConfigSax2ContentHandler::startPrefixMapping const XMLCh *const   prefix,
const XMLCh *const   uri
[virtual]
 

Definiert in Zeile 154 der Datei ConfigSax2ContentHandler.cpp.

Benutzt XMLCh.

00156 {
00157     
00158 }


Dokumentation der Datenelemente

std::map< std::string, std::string >& psfa::ConfigSax2ContentHandler::data_ [private]
 

Die Referenz auf den Container für die Konfiguration.

Definiert in Zeile 101 der Datei ConfigSax2ContentHandler.hpp.

Wird benutzt von characters().

std::string psfa::ConfigSax2ContentHandler::key_ [private]
 

Der aktuelle Schlüssel.

Definiert in Zeile 107 der Datei ConfigSax2ContentHandler.hpp.

Wird benutzt von characters().

Mode psfa::ConfigSax2ContentHandler::mode_ [private]
 

Das interne Zustandsobjekt.

Definiert in Zeile 99 der Datei ConfigSax2ContentHandler.hpp.

Wird benutzt von characters() und startElement().

std::string psfa::ConfigSax2ContentHandler::pool_ [private]
 

Der aktuelle Pool.

Definiert in Zeile 105 der Datei ConfigSax2ContentHandler.hpp.

Wird benutzt von characters().


Die Dokumentation für diese Klasse wurde erzeugt aufgrund der Dateien:
Erzeugt am Mon Jul 12 11:45:08 2004 für PSFA von doxygen 1.3.4