Changeset 288 in pacpusframework for trunk/include/Pacpus/kernel/ComponentFactoryBase.h
- Timestamp:
- 03/26/14 21:27:30 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/Pacpus/kernel/ComponentFactoryBase.h
r196 r288 18 18 #include <Pacpus/kernel/PacpusLibConfig.h> 19 19 20 #include <boost/shared_ptr.hpp> 21 //#include <boost/weak_ptr.hpp> 22 20 23 class QString; 21 24 22 namespace pacpus { 25 namespace pacpus 26 { 27 28 class ComponentBase; 29 30 typedef boost::shared_ptr<ComponentBase> ComponentSharedPointer; 31 //typedef boost::weak_ptr<ComponentBase> ComponentWeakPointer; 23 32 24 33 class ComponentManager; 25 class ComponentBase;26 34 27 35 /** ComponentFactoryBase … … 31 39 { 32 40 friend class ComponentManager; 41 33 42 public: 34 43 /** Ctor of ComponentFactoryBase. */ … … 42 51 * @return Pointer on the newly created component, you become the owner of its lifetime. 43 52 */ 44 virtual Component Base * instantiateComponent(const QString& name) = 0;53 virtual ComponentSharedPointer instantiateComponent(QString const& name) = 0; 45 54 46 55 /** Register a new factory. … … 48 57 * @param type Name of the type created by the factory. 49 58 */ 50 void addFactory(ComponentFactoryBase* addr, const QString& type);59 void addFactory(ComponentFactoryBase* addr, QString const& type); 51 60 52 61 /** Add a new component. 53 62 * @param name Name of the new component. 54 63 */ 55 void addComponent(const QString& name);64 void createComponent(QString const& name); 56 65 57 66 private:
Note:
See TracChangeset
for help on using the changeset viewer.