Closed Thomaltarix closed 8 months ago
To respect the subject, we need to refactor the creation of the components. At the moment, we are using this function:
IComponent *ComponentFactory::createComponent(const std::string &name) { return _components[name]->clone(); }
For the exemple of the Input component, that's it:
Input
InputComponent *InputComponent::clone() const { return new InputComponent(); }
But in the subject, it's said that we have to use unique pointers:
So we might swap to unique pointers.
We need to handle this lines.
👮♂️ What's needed
To respect the subject, we need to refactor the creation of the components. At the moment, we are using this function:
For the exemple of the
Input
component, that's it:But in the subject, it's said that we have to use unique pointers:
So we might swap to unique pointers.
🧪 Given test cases
We need to handle this lines.