Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New extension design #102

Merged
merged 3 commits into from
May 18, 2020
Merged

Conversation

sebalaig
Copy link
Contributor

@sebalaig sebalaig commented May 13, 2020

Signed-off-by: Sébastien LAIGRE slaigre@silicom.fr

Please check if the PR fulfills these requirements (please use '[x]' to check the checkboxes, or submit the PR and then click the checkboxes)

  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

Does this PR already have an issue describing the problem ? If so, link to this issue using '#XXX' and skip the rest
Issue #35

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
It provides an API to make easier the addition of an extension to an extendable by using an ExtensionAdder.

What is the current behavior? (You can also link to an open issue here)
User has to call

std::unique_ptr<MyExtension> myExtension = stdcxx::make_unique<MyExtension>
myExtendable.addExtension(std::move(myExtension ));

to add the extension.

What is the new behavior (if this is a feature change)?
User can call

myExtendable.newExtension<MyExtensionAdder>().add();

to add into myExtendable.

Does this PR introduce a breaking change or deprecate an API? If yes, check the following:

  • The Breaking Change or Deprecated label has been added
  • The migration guide has been updated in the github wiki (What changes might users need to make in their application due to this PR?)

Other information:

(if any of the questions/checkboxes don't apply, please delete them entirely)

@sebalaig sebalaig requested a review from mathbagu May 13, 2020 06:42
@sebalaig sebalaig self-assigned this May 13, 2020
@mathbagu mathbagu added this to In progress in IIDM v1.1 via automation May 13, 2020
include/powsybl/iidm/Extendable.hpp Outdated Show resolved Hide resolved
include/powsybl/iidm/ExtensionAdder.hpp Show resolved Hide resolved
include/powsybl/iidm/ExtensionAdder.hpp Show resolved Hide resolved
IIDM v1.1 automation moved this from In progress to Review May 13, 2020
Signed-off-by: Sébastien LAIGRE <slaigre@silicom.fr>
Signed-off-by: Sébastien LAIGRE <slaigre@silicom.fr>
@sonarcloud
Copy link

sonarcloud bot commented May 18, 2020

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 1 Code Smell

76.9% 76.9% Coverage
0.0% 0.0% Duplication

@mathbagu mathbagu merged commit a09e8bd into integration/v1.1.0 May 18, 2020
IIDM v1.1 automation moved this from Review to Done May 18, 2020
@mathbagu mathbagu deleted the issue35-new-extension-design branch May 18, 2020 17:18
mathbagu pushed a commit that referenced this pull request Jun 11, 2020
Signed-off-by: Sébastien LAIGRE <slaigre@silicom.fr>
mathbagu pushed a commit that referenced this pull request Jun 11, 2020
Signed-off-by: Sébastien LAIGRE <slaigre@silicom.fr>
mathbagu pushed a commit that referenced this pull request Jun 17, 2020
Signed-off-by: Sébastien LAIGRE <slaigre@silicom.fr>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
IIDM v1.1
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants