Ignore:
Timestamp:
07/31/13 11:20:11 (11 years ago)
Author:
Marek Kurdej
Message:

Update: refactoring in XmlConfigFile.
Added: attributes 'prefix', 'postfix', 'extension' in <parameters>.
Example: <parameters prefix="" postfix="_d" extension="dll">

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.0-beta1/include/Pacpus/kernel/ComponentManager.h

    r89 r146  
    3838
    3939/// Singleton recording the components and managing them.
    40 class ComponentManager
     40class PACPUSLIB_API ComponentManager
    4141{
    4242    friend class ComponentBase;
     
    4545    /// @returns a pointer to the ComponentManager object
    4646    /// @deprecated Use getInstance()
    47     PACPUS_DEPRECATED_MSG( static PACPUSLIB_API ComponentManager * create(), "use 'getInstance()'" );
     47    PACPUS_DEPRECATED_MSG( static ComponentManager * create(), "use 'getInstance()'" );
    4848
    4949    /// Returns an instance of the singleton ComponentManager class.
    5050    /// @returns Pointer to the ComponentManager singleton.
    51     static PACPUSLIB_API ComponentManager* getInstance();
     51    static ComponentManager* getInstance();
    5252
    5353    /// Destroys the ComponentManager singleton.
    5454    ///
    5555    /// After this call, every pointer to the ComponentManager becomes invalid.
    56     static PACPUSLIB_API void destroy();
     56    static void destroy();
    5757
    5858    /// Automatic deleter class.
     
    7272     * @return Number of components loaded by the manager.
    7373     */
    74     PACPUSLIB_API std::size_t loadComponents(const QString& file);
     74    std::size_t loadComponents(const QString& file);
    7575
    7676    /** Start all the components
    7777     * @return True if all the component has been started, otherwise false.
    7878     */
    79     PACPUSLIB_API bool start();
     79    bool start();
    8080
    8181    /** Start only the component passed in parameter.
     
    8383     * @return True if the component exists and has been started, otherwise false.
    8484     */
    85     PACPUSLIB_API bool start(const QString& component);
     85    bool start(const QString& component);
    8686
    8787    /** Stop all the components
    8888     * @return True if all the component has been stopped, otherwise false.
    8989     */
    90     PACPUSLIB_API bool stop();
     90    bool stop();
    9191
    9292    /** Stop only the component passed in parameter.
     
    9494     * @return True if the component has been stopped, otherwise false.
    9595     */
    96     PACPUSLIB_API bool stop(const QString& component);
     96    bool stop(const QString& component);
    9797
    9898    /** Get a pointer to the component referred by @em name.
     
    100100     * @return Pointer to the component if it exists, otherwise @em NULL.
    101101     */
    102     PACPUSLIB_API ComponentBase* getComponent(const QString& name);
     102    ComponentBase* getComponent(const QString& name);
    103103
    104104    /** Get the list of all the names of the component known by the manager.
    105105     * @return List of all the component's name.
    106106     */
    107     PACPUSLIB_API QStringList getAllComponentsName() const;
     107    QStringList getAllComponentsName() const;
    108108
    109109    /** Load a new plugin from the file filename (it may be a .so/.dll file)
     
    111111     * @return True if the plugin has been loaded, otherwise false.
    112112     */
    113     PACPUSLIB_API bool loadPlugin(const QString& filename);
     113    bool loadPlugin(const QString& filename);
    114114
    115115private:
     116    bool stop(ComponentBase* component) const;
     117
    116118    /// Create a new component of type 'type' and with the name 'name'
    117119    bool createComponent(const QString& type, const QString& name);
     
    122124    bool registerComponentFactory(ComponentFactoryBase* addr, const QString& type);
    123125
    124     bool unRegisterComponent(const QString& name);
    125     bool unRegisterComponentFactory(const QString& type);
     126    bool unregisterComponent(const QString& name);
     127    bool unregisterComponentFactory(const QString& type);
    126128
    127129    // Allow 2 functions to access to private members of ComponentManager
Note: See TracChangeset for help on using the changeset viewer.