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

Adds some Intersection/IntersectionBook API & bindings. #78

Merged
merged 2 commits into from
May 14, 2024

Conversation

francocipollone
Copy link
Contributor

@francocipollone francocipollone commented May 7, 2024

🎉 New feature

Related to :

Summary

  • Adds IntersectionBook API and bindings:
    • GetIntersection & GetIntersections
  • Adds Intersection API and bindings
    • Id

Checklist

  • Signed all commits for DCO
  • Added tests
  • Added example and/or tutorial
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • Consider updating Python bindings (if it affects the public API)

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by messages.

Signed-off-by: Franco Cipollone <[email protected]>
Copy link
Contributor

@agalbachicar agalbachicar left a comment

Choose a reason for hiding this comment

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

Just a question to go, the rest LGTM.


// IntersectionBook_GetIntersections
std::vector<MutIntersectionPtr>& IntersectionBook_GetIntersections(IntersectionBook& intersection_book) {
static std::vector<MutIntersectionPtr> intersections;
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it correct? Wouldn't be mixing things if we load two road networks throughout the lifetime of a program?
I don't remember how we are using now libraries, but this could also be a shared library used by two programs simultaneously, right? That could end up in the same data leak.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point. I will find a workaround

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

Signed-off-by: Franco Cipollone <[email protected]>
@francocipollone francocipollone merged commit 0c6d163 into main May 14, 2024
3 checks passed
@francocipollone francocipollone deleted the francocipollone/intersection branch May 14, 2024 14:52
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.

2 participants