Changeset 116 in pacpusframework for trunk/include/Pacpus/kernel/ComponentFactory.h


Ignore:
Timestamp:
06/25/13 13:44:25 (11 years ago)
Author:
Marek Kurdej
Message:

Added: PacpusException - base class for all exceptions. DbiteExceptions inherits from it.
Added: PacpusLibConfig.h - dllimport/dllexport clauses separated from pacpus.h.
Update: comments.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/Pacpus/kernel/ComponentFactory.h

    r115 r116  
    2323#include <Pacpus/kernel/ComponentFactoryBase.h>
    2424
    25 #include <QtGlobal>
    2625#include <QString>
    2726
     
    3736/// @see pacpus::ComponentFactory
    3837#define REGISTER_COMPONENT(className, factoryName) \
    39   static pacpus::ComponentFactory<className> sFactory(factoryName)
     38    static pacpus::ComponentFactory<className> sFactory(factoryName)
    4039
    4140namespace pacpus {
     
    5049{
    5150    BOOST_STATIC_ASSERT_MSG((boost::is_base_of<ComponentBase, T>::value), "T must inherit from ComponentBase");
     51
    5252public:
    53     /** Ctor of ComponentFactory, initialize the factory of the components of type @em T.
    54      * @param type Name of the type of the components.
    55      */
     53    /// Ctor of ComponentFactory, initialize the factory of the components of type @em T.
     54    /// @param type Name of the type of the components.
    5655    ComponentFactory(const QString& type);
    57    
    58     /** Dtor of ComponentFactory. */
     56
     57    /// Dtor of ComponentFactory.
    5958    virtual ~ComponentFactory();
    6059
    61     /** Get the name of the type of the components.
    62      * @return Name of the type of the components.
    63      */
     60    /// Gets the name of the type of the components.
     61    /// @returns Name of the type of the components.
    6462    const QString& getType() const;
    6563
    6664protected:
    6765    virtual ComponentBase* instantiateComponent(const QString& name);
    68  
     66
    6967private:
    7068    QString mType;
     
    7371template <typename T>
    7472ComponentFactory<T>::ComponentFactory(const QString& type)
    75   : mType(type)
     73    : mType(type)
    7674{
    7775    assert(!type.isEmpty());
     
    9694}
    9795
    98 } // pacpus
     96} // namespace pacpus
    9997
    10098#endif // DEF_PACPUS_DBITEEXCEPTION_H
Note: See TracChangeset for help on using the changeset viewer.