00001 // Copyright CERN 2012 - Developed in collaboration with GSI 00002 00003 #ifndef ABSTRACT_COMPONENT_EQUIPMENT_H_ 00004 #define ABSTRACT_COMPONENT_EQUIPMENT_H_ 00005 00006 #include <vector> 00007 #include <string> 00008 #include <fesa-core/Core/FesaDefs.h> 00009 00010 namespace fesa 00011 { 00012 00013 class AbstractDeviceClass; 00014 00020 class AbstractComponentEquipment 00021 { 00022 public: 00023 00027 virtual void initialize(); 00028 00032 virtual void specificInit() = 0; 00033 00038 virtual void start(RunMode runMode) = 0; 00039 00044 const std::vector<AbstractDeviceClass*>& getDeviceClassCol(); 00045 00051 AbstractDeviceClass* getDeviceClass(const std::string& className); 00052 00057 void registerDeviceClass(AbstractDeviceClass* abstractDeviceClass); 00058 00063 void deregisterDeviceClass(const std::string& className); 00064 00068 virtual ~AbstractComponentEquipment(); 00069 00070 protected: 00071 00075 AbstractComponentEquipment(); 00076 00080 virtual void waitSignal() = 0; 00081 00085 std::vector<AbstractDeviceClass*> abstractDeviceClassCol_; 00086 }; 00087 00088 inline const std::vector<AbstractDeviceClass*>& AbstractComponentEquipment::getDeviceClassCol() 00089 { 00090 return abstractDeviceClassCol_; 00091 } 00092 00093 inline void AbstractComponentEquipment::registerDeviceClass(AbstractDeviceClass* abstractDeviceClass) 00094 { 00095 abstractDeviceClassCol_.push_back(abstractDeviceClass); 00096 } 00097 00098 } // fesa 00099 00100 #endif // ABSTRACT_COMPONENT_EQUIPMENT_H_