diff options
author | Leena Miettinen <riitta-leena.miettinen@theqtcompany.com> | 2015-02-18 15:54:40 +0100 |
---|---|---|
committer | Leena Miettinen <riitta-leena.miettinen@theqtcompany.com> | 2015-02-24 12:59:28 +0000 |
commit | 3a1830c279adf9599c0e8da524567cd4c6560b23 (patch) | |
tree | 869fd4ac8d6b91d29c00408c0ee224c4bac8b9bd /src | |
parent | ce3a0b4558d05e23cc0a0eadaea3fd0301b51099 (diff) |
Doc: add docs for KDGenericFactory class
Change-Id: I4d4f5d2d92cfb5dcf5d171e871115eb5ebd2c3c3
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/libs/kdtools/kdgenericfactory.cpp | 31 |
1 files changed, 28 insertions, 3 deletions
diff --git a/src/libs/kdtools/kdgenericfactory.cpp b/src/libs/kdtools/kdgenericfactory.cpp index 056a022a0..65cc14913 100644 --- a/src/libs/kdtools/kdgenericfactory.cpp +++ b/src/libs/kdtools/kdgenericfactory.cpp @@ -129,7 +129,7 @@ /*! \fn KDGenericFactory::~KDGenericFactory() - Destructor. + Destroys the generic factory. */ /*! @@ -139,9 +139,26 @@ */ /*! + \typedef KDGenericFactory::FactoryFunctionWithArg + + This typedef defines a factory function producing an object of type T_Product + with the arguments specified by \a arg. +*/ + +/*! \fn KDGenericFactory::registerProduct( const T_Identifier& name ) - Registers a product of type T, identified by \a name in the factory. + Registers a product of the type T, identified by \a name in the factory. + Any type with the same name gets unregistered. + + If a product was registered via this method, it will be created using its + default constructor. +*/ + +/*! + \fn KDGenericFactory::registerProductWithArg(const T_Identifier &name) + + Registers a product of the type T, identified by \a name, with arguments. Any type with the same name gets unregistered. If a product was registered via this method, it will be created using its @@ -151,6 +168,14 @@ /*! \fn KDGenericFactory::create( const T_Identifier& name ) const - Creates and returns a product of the type identified by \a name. + Creates and returns a product of the type T identified by \a name. + Ownership of the product is transferred to the caller. +*/ + +/*! + \fn KDGenericFactory::createWithArg(const T_Identifier &name, const T_Argument &arg) const + + Creates and returns a product of the type T identified by \a name with the + arguments specified by \a arg. Ownership of the product is transferred to the caller. */ |