OptionsLoader.h
Go to the documentation of this file.00001
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef OptionsLoader_h
00020 #define OptionsLoader_h
00021
00022
00023
00024
00025
00026 #ifdef _MSC_VER
00027 #include <windows_config.h>
00028 #else
00029 #include <config.h>
00030 #endif
00031
00032 #include <xercesc/sax/HandlerBase.hpp>
00033 #include <xercesc/sax/AttributeList.hpp>
00034 #include <xercesc/sax/SAXParseException.hpp>
00035 #include <xercesc/sax/SAXException.hpp>
00036 #include <string>
00037
00038
00039
00040
00041
00042 #if defined(XERCES_HAS_CPP_NAMESPACE)
00043 using namespace XERCES_CPP_NAMESPACE;
00044 #endif
00045
00046
00047
00048
00049
00050 class OptionsCont;
00051
00052
00053
00054
00055
00060 class OptionsLoader : public HandlerBase {
00061 public:
00064 OptionsLoader() throw();
00065
00066
00068 ~OptionsLoader() throw();
00069
00070
00071
00072
00075
00080 virtual void startElement(const XMLCh* const name,
00081 AttributeList& attributes);
00082
00083
00091 void characters(const XMLCh* const chars, const XERCES3_SIZE_t length);
00092
00093
00098 void endElement(const XMLCh* const name);
00100
00101
00102
00103
00106
00111 void warning(const SAXParseException& exception);
00112
00113
00118 void error(const SAXParseException& exception);
00119
00120
00125 void fatalError(const SAXParseException& exception);
00127
00128
00129
00131 bool errorOccured() const throw();
00132
00133
00134 private:
00143 void setValue(const std::string &key, std::string &value);
00144
00145
00155 bool setSecure(const std::string &name, bool value) const throw();
00156
00157
00167 bool setSecure(const std::string &name, const std::string &value) const throw();
00168
00169
00170 private:
00172 OptionsLoader(const OptionsLoader &s);
00173
00174
00176 OptionsLoader &operator=(const OptionsLoader &s);
00177
00178
00179 private:
00181 bool myError;
00182
00184 OptionsCont &myOptions;
00185
00187 std::string myItem;
00188
00190 std::string myValue;
00191
00192 };
00193
00194
00195 #endif
00196
00197
00198