Changeset 16 in pacpusframework for trunk/include/Pacpus/kernel
- Timestamp:
- Jan 8, 2013, 1:51:02 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/Pacpus/kernel/ComponentManager.h
r14 r16 66 66 * @return Number of components loaded by the manager. 67 67 */ 68 PACPUSLIB_API std::size_t loadComponents( QStringfile);68 PACPUSLIB_API std::size_t loadComponents(const QString& file); 69 69 70 70 /** Start all the components … … 77 77 * @return True if the component exists and has been started, otherwise false. 78 78 */ 79 PACPUSLIB_API int start( QStringcomponent);79 PACPUSLIB_API int start(const QString& component); 80 80 81 81 /** Stop all the components … … 88 88 * @return True if the component has been stopped, otherwise false. 89 89 */ 90 PACPUSLIB_API int stop( QStringcomponent);90 PACPUSLIB_API int stop(const QString& component); 91 91 92 92 /** Get a pointer to the component referred by @em name. … … 94 94 * @return Pointer to the component if it exists, otherwise @em NULL. 95 95 */ 96 PACPUSLIB_API ComponentBase* getComponent( QStringname);96 PACPUSLIB_API ComponentBase* getComponent(const QString& name); 97 97 98 98 /** Get the list of all the names of the component known by the manager. … … 105 105 * @return True if the plugin has been loaded, otherwise false. 106 106 */ 107 PACPUSLIB_API bool loadPlugin( QStringfilename);107 PACPUSLIB_API bool loadPlugin(const QString& filename); 108 108 109 109 private: 110 110 /// Create a new component of type 'type' and with the name 'name' 111 bool createComponent( QString type, QStringname);111 bool createComponent(const QString& type, const QString& name); 112 112 113 bool registerComponent(ComponentBase * addr, QStringname);114 bool registerComponentFactory(ComponentFactoryBase * addr, QStringtype);113 bool registerComponent(ComponentBase* addr, const QString& name); 114 bool registerComponentFactory(ComponentFactoryBase* addr, const QString& type); 115 115 116 bool unRegisterComponent( QStringname);117 bool unRegisterComponentFactory( QStringtype);116 bool unRegisterComponent(const QString& name); 117 bool unRegisterComponentFactory(const QString& type); 118 118 119 119 // Allow 2 functions to access to private members of ComponentManager 120 friend void ComponentFactoryBase::addFactory(ComponentFactoryBase 120 friend void ComponentFactoryBase::addFactory(ComponentFactoryBase* addr, const QString & type); 121 121 friend void ComponentFactoryBase::addComponent(const QString & name); 122 122
Note:
See TracChangeset
for help on using the changeset viewer.