DeviceElement2.h
Go to the documentation of this file.00001
00002 #ifndef DEVICEELEMENT2_H_
00003 #define DEVICEELEMENT2_H_
00004
00005 #include <boost/shared_ptr.hpp>
00006 #include <boost/enable_shared_from_this.hpp>
00007 #include <vector>
00008 #include <string>
00009
00010 namespace fesa
00011 {
00012
00013 class ClassElement;
00014 class AbstractDeviceFactory;
00015 class AbstractDevice;
00016 class ElementXML;
00017 class ParserElementFactory;
00018 class DeviceLogicalEventElement;
00019
00020
00025 class DeviceElement2: public boost::enable_shared_from_this<DeviceElement2>
00026 {
00027 public:
00028
00033 DeviceElement2(boost::shared_ptr<ClassElement> parent, bool isGlobalDevice);
00034
00038 virtual void initialize(const std::string& xpath,ElementXML* deviceElement,AbstractDeviceFactory* factory, ParserElementFactory& parserElementFactory);
00039
00040 virtual ~DeviceElement2();
00041
00042 virtual AbstractDevice* getDeviceRef() const;
00043
00047 virtual void connectEventConfigRefs();
00048
00049 protected:
00050
00054 DeviceElement2();
00055
00056 private:
00057
00061 std::string loadAttribute(const std::string& xpath, ElementXML* element,const std::string& attributeName);
00062
00066 void loadEventsMappingElement(const std::string& xpath,ElementXML* deviceElement, ParserElementFactory& parserElementFactory);
00067
00071 void loadLogicalEventElements(const std::string& xpath,ElementXML* eventsMappingElement, ParserElementFactory& parserElementFactory);
00072
00076 std::vector<boost::shared_ptr<DeviceLogicalEventElement> > logicalEventElementCol_;
00077
00081 boost::shared_ptr<ClassElement> parentClassElement_;
00082
00086 AbstractDevice* deviceRef_;
00087
00091 bool isInitialized_;
00092
00096 bool isGlobalDevice_;
00097
00098 };
00099
00100 }
00101
00102 #endif