00001 #ifndef Y2CCParted_h 00002 #define Y2CCParted_h 00003 00004 #include <Y2.h> 00005 #include "Y2PartedComponent.h" 00006 00007 class Y2CCParted : public Y2ComponentCreator 00008 { 00009 public: 00010 // Create a parted component creator and register it 00011 Y2CCParted() : Y2ComponentCreator(Y2ComponentBroker::BUILTIN) 00012 {} 00013 00014 // The parted component is a client 00015 bool isServerCreator() const { return false; } 00016 00017 // Create a new parted component if name is our name 00018 Y2Component *create(const char *name) const 00019 { 00020 if (strcmp(name, Y2PartedComponent::component_name().c_str()) == 0) 00021 return new Y2PartedComponent(); 00022 else 00023 return 0; 00024 } 00025 }; 00026 00027 #endif // Y2CCParted_h