Changeset 146 in pacpusframework for branches/2.0-beta1/include/Pacpus/kernel/ComponentManager.h
- Timestamp:
- 07/31/13 11:20:11 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.0-beta1/include/Pacpus/kernel/ComponentManager.h
r89 r146 38 38 39 39 /// Singleton recording the components and managing them. 40 class ComponentManager40 class PACPUSLIB_API ComponentManager 41 41 { 42 42 friend class ComponentBase; … … 45 45 /// @returns a pointer to the ComponentManager object 46 46 /// @deprecated Use getInstance() 47 PACPUS_DEPRECATED_MSG( static PACPUSLIB_APIComponentManager * create(), "use 'getInstance()'" );47 PACPUS_DEPRECATED_MSG( static ComponentManager * create(), "use 'getInstance()'" ); 48 48 49 49 /// Returns an instance of the singleton ComponentManager class. 50 50 /// @returns Pointer to the ComponentManager singleton. 51 static PACPUSLIB_APIComponentManager* getInstance();51 static ComponentManager* getInstance(); 52 52 53 53 /// Destroys the ComponentManager singleton. 54 54 /// 55 55 /// After this call, every pointer to the ComponentManager becomes invalid. 56 static PACPUSLIB_APIvoid destroy();56 static void destroy(); 57 57 58 58 /// Automatic deleter class. … … 72 72 * @return Number of components loaded by the manager. 73 73 */ 74 PACPUSLIB_APIstd::size_t loadComponents(const QString& file);74 std::size_t loadComponents(const QString& file); 75 75 76 76 /** Start all the components 77 77 * @return True if all the component has been started, otherwise false. 78 78 */ 79 PACPUSLIB_APIbool start();79 bool start(); 80 80 81 81 /** Start only the component passed in parameter. … … 83 83 * @return True if the component exists and has been started, otherwise false. 84 84 */ 85 PACPUSLIB_APIbool start(const QString& component);85 bool start(const QString& component); 86 86 87 87 /** Stop all the components 88 88 * @return True if all the component has been stopped, otherwise false. 89 89 */ 90 PACPUSLIB_APIbool stop();90 bool stop(); 91 91 92 92 /** Stop only the component passed in parameter. … … 94 94 * @return True if the component has been stopped, otherwise false. 95 95 */ 96 PACPUSLIB_APIbool stop(const QString& component);96 bool stop(const QString& component); 97 97 98 98 /** Get a pointer to the component referred by @em name. … … 100 100 * @return Pointer to the component if it exists, otherwise @em NULL. 101 101 */ 102 PACPUSLIB_APIComponentBase* getComponent(const QString& name);102 ComponentBase* getComponent(const QString& name); 103 103 104 104 /** Get the list of all the names of the component known by the manager. 105 105 * @return List of all the component's name. 106 106 */ 107 PACPUSLIB_APIQStringList getAllComponentsName() const;107 QStringList getAllComponentsName() const; 108 108 109 109 /** Load a new plugin from the file filename (it may be a .so/.dll file) … … 111 111 * @return True if the plugin has been loaded, otherwise false. 112 112 */ 113 PACPUSLIB_APIbool loadPlugin(const QString& filename);113 bool loadPlugin(const QString& filename); 114 114 115 115 private: 116 bool stop(ComponentBase* component) const; 117 116 118 /// Create a new component of type 'type' and with the name 'name' 117 119 bool createComponent(const QString& type, const QString& name); … … 122 124 bool registerComponentFactory(ComponentFactoryBase* addr, const QString& type); 123 125 124 bool un RegisterComponent(const QString& name);125 bool un RegisterComponentFactory(const QString& type);126 bool unregisterComponent(const QString& name); 127 bool unregisterComponentFactory(const QString& type); 126 128 127 129 // Allow 2 functions to access to private members of ComponentManager
Note:
See TracChangeset
for help on using the changeset viewer.