Add support for passing arguments to constructors#223
Add support for passing arguments to constructors#223pum1k wants to merge 3 commits intoros:rollingfrom
Conversation
- added InterfaceTraits type trait that can be used to define the constructor arguments used by the derived classes - changed class loaders to pass arguments to the derived classes based on the information stored in InterfaceTraits Signed-off-by: pum1k <55055380+pum1k@users.noreply.github.com>
|
Hi @ahcorde, |
|
Pulls: #223 |
Signed-off-by: pum1k <55055380+pum1k@users.noreply.github.com>
|
The |
Signed-off-by: pum1k <55055380+pum1k@users.noreply.github.com>
|
The MSVC problem should also be fixed now. |
|
Pulls: #223 |
This PR adds the ability to pass arguments to constructors of the derived classes. As a result, users can now create plugins that are not default constructible, removing the need for initialize method.
To achieve this, a new customization point was added: template struct
InterfaceTraits. Specializing this struct allows users to define signature of the constructors that will be required by the derived classes.If users do not specialize this structure, default constructor is assumed and there are no changes to the behavior.