00001 // Copyright CERN 2012 - Developed in collaboration with GSI 00002 #ifndef EVENTELEMENT_H_ 00003 #define EVENTELEMENT_H_ 00004 00005 #include <fesa-core/RealTime/AbstractEventSource.h> 00006 #include <boost/shared_ptr.hpp> 00007 #include <string> 00008 #include <set> 00009 00010 namespace fesa 00011 { 00012 00013 class EventConfigurationElement; 00014 class ElementXML; 00015 class AbstractDevice; 00016 00021 class EventElement 00022 { 00023 public: 00024 00025 virtual ~EventElement(); 00026 00030 virtual void initialize(const std::string& xpath,ElementXML* eventElement) = 0; 00031 00032 virtual const std::string& getSourceTypeSpecificData(const std::string& dataTag) = 0; 00033 00034 virtual const std::string& getLogicalName() const; 00035 00036 virtual const std::string& getEventSourceName() const; 00037 00038 virtual const EventSourceType& getEventSourceType() const; 00039 00040 virtual const std::string& getConcreteName() const; 00041 00042 virtual const std::set<AbstractDevice*>& getDeviceCollection() const; 00043 00047 virtual void addDeviceRef(AbstractDevice* device); 00048 00049 protected: 00050 00055 EventElement(boost::shared_ptr<EventConfigurationElement> parent,const EventSourceType sourceType); 00056 00060 EventElement(); 00061 00065 std::string eventSourceName_; 00066 00071 std::string concreteEventName_; 00072 00077 bool isInitialized_; 00078 00079 private: 00080 00081 EventSourceType eventSourceType_; 00082 00087 std::set<AbstractDevice*> deviceCol_; 00088 00092 boost::shared_ptr<EventConfigurationElement> parentEventConfigurationElement_; 00093 00094 }; 00095 00096 } //end namespace 00097 00098 #endif /* EVENTELEMENT_H_ */