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

Implptr Get function #27

Merged
merged 10 commits into from
Nov 23, 2021
Merged

Implptr Get function #27

merged 10 commits into from
Nov 23, 2021

Conversation

nkoenig
Copy link
Contributor

@nkoenig nkoenig commented Oct 5, 2021

🎉 New feature

Summary

Adds a get function to the ImplPtr class so that you can do things like:

class Implementation
{
  public: void Run();
  public: std::thread runThread;
};

class MainClass
{
  public: void Load()
  {
    this->dataPtr->runThread = std::thread(&Implementation::Run, this->dataPtr.Get());
  }
}; 

Test it

Run the tests.

Checklist

  • Signed all commits for DCO
  • Added tests
  • Added example and/or tutorial
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • codecheck passed (See contributing)
  • All tests passed (See test coverage)
  • While waiting for a review on your PR, please help review another open pull request to support the maintainers

Note to maintainers: Remember to use Squash-Merge

chapulina and others added 8 commits April 1, 2021 18:08
Signed-off-by: Louise Poubel <louise@openrobotics.org>
Signed-off-by: Nate Koenig <nate@openrobotics.org>
Signed-off-by: Nate Koenig <nate@openrobotics.org>
Signed-off-by: Nate Koenig <nate@openrobotics.org>
Co-authored-by: Louise Poubel <louise@openrobotics.org>
Signed-off-by: Nate Koenig <nate@openrobotics.org>
@nkoenig nkoenig requested a review from azeey as a code owner October 5, 2021 23:24
@codecov-commenter
Copy link

codecov-commenter commented Oct 5, 2021

Codecov Report

Merging #27 (6419a1b) into ign-utils1 (e9c439b) will increase coverage by 4.41%.
The diff coverage is 100.00%.

Impacted file tree graph

@@              Coverage Diff               @@
##           ign-utils1      #27      +/-   ##
==============================================
+ Coverage       89.58%   94.00%   +4.41%     
==============================================
  Files               3        3              
  Lines              48       50       +2     
==============================================
+ Hits               43       47       +4     
+ Misses              5        3       -2     
Impacted Files Coverage Δ
include/ignition/utils/ImplPtr.hh 100.00% <ø> (ø)
include/ignition/utils/detail/ImplPtr.hh 91.17% <100.00%> (+6.80%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e9c439b...6419a1b. Read the comment docs.

@chapulina
Copy link
Contributor

Can this target ign-utils1?

@nkoenig nkoenig changed the base branch from main to ign-utils1 October 6, 2021 19:53
Signed-off-by: Nate Koenig <nate@openrobotics.org>
@nkoenig
Copy link
Contributor Author

nkoenig commented Oct 6, 2021

Can this target ign-utils1?

Done

Copy link
Contributor

@azeey azeey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One minor comment regarding what seems to be duplicate tests. Otherwise, LGTM!

test/integration/implptr/implptr_test_classes.cc Outdated Show resolved Hide resolved
test/integration/implptr/ImplPtr_TEST.cc Show resolved Hide resolved
Signed-off-by: Nate Koenig <nate@openrobotics.org>
@nkoenig nkoenig merged commit bb3f23a into ign-utils1 Nov 23, 2021
@nkoenig nkoenig deleted the implptr_get branch November 23, 2021 04:22
@osrf-triage
Copy link

This pull request has been mentioned on Gazebo Community. There might be relevant details there:

https://community.gazebosim.org/t/new-ignition-releases-2022-03-01-citadel-edifice-fortress/1313/1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants