Refactoring #1472
Introduce additional template parameter for IFactory to be able to use QString as a key
Status: | Archived | Start date: | 20 Jun 2016 | |
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | herck | % Done: | 0% | |
Category: | - | |||
Target version: | Sprint 31 |
Description
I need IFactory to accept QString as key, to be able to write in GUI
resiterItem(QString("Color Map"), &createInstance<ColorMapWidget>)
or similar way using std::function for item creation.
and then use it
QWidget *createItem(QString("Color Map");
Suggestion is also to get rid from methods setOwnObject(true)
History
#1 Updated by herck over 4 years ago
- Assignee set to herck
#2 Updated by herck over 4 years ago
- Status changed from Sprint to Resolved
IFactory can now be customized by key-type and no longer needs build function templates that explicitly return base pointers, because the underlying std::function is return type covariant
#3 Updated by herck over 4 years ago
- Status changed from Resolved to Archived