Go to the documentation of this file.00001 #ifndef CONFIG_PROPERTY_GETTER_H
00002 #define CONFIG_PROPERTY_GETTER_H
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033 #ifndef __cplusplus
00034 #error This is a C++ include file and cannot be used from plain C
00035 #endif
00036
00037 #include <expat.h>
00038 #include <list>
00039
00040 #include <maciS.h>
00041 #include "acsErrTypeAlarmSourceFactory.h"
00042
00043 typedef struct {
00044 std::string key;
00045 std::string value;
00046 } Property;
00047
00052 class ConfigPropertyGetter {
00053 private:
00054
00055 std::string m_dao;
00056
00057 std::list<Property>* m_properties;
00058 public:
00059 ConfigPropertyGetter(maci::Manager_ptr manager);
00060 ~ConfigPropertyGetter();
00061
00069 std::string getProperty(std::string propName);
00070
00071 private:
00079 std::string getDAO(maci::Manager_ptr manager);
00080
00084 void parseDAO();
00085
00091 static void start_hndl(void *data, const XML_Char *el, const XML_Char **attr);
00092
00098 static void end_hndl(void *data, const XML_Char *el);
00099
00105 static void char_hndl(void *data, const XML_Char *s, int len);
00106
00107 };
00108
00109 #endif