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

Add a Dragway Factory To Simplify the Public API and Hide Details #5128

Closed
liangfok opened this issue Feb 10, 2017 · 1 comment
Closed

Add a Dragway Factory To Simplify the Public API and Hide Details #5128

liangfok opened this issue Feb 10, 2017 · 1 comment
Assignees
Labels
priority: low type: cleanup unused team: automotive This team is no longer active within this repository.

Comments

@liangfok
Copy link
Contributor

liangfok commented Feb 10, 2017

Quotes from #5038:

From @maddog-tri:

However, something that would be nice from the user's perspective is to provide a static constructor function (e.g., MakeDragway(...)) in its own header file which returns an api::RoadGeometry --- that way none of the other dragway header files even need to be installed anywhere. (Heck, it could all get buried into a single .cc file at that point, not that that necessarily improves maintainability.)

From @jwnimmer-tri:

Note that a good way to compact it (if you choose to do so) is to have only one public master outer class (possibly inheriting nothing, or possibly RoadGeometry) and then have an private Impl class within in implement all of the interfaces (rather than directly expose them to the public). That saves all of the syntax of separate declaration-and-definition because all of the signatures go directly into the cc file, with bodies.

@liangfok liangfok added unused team: automotive This team is no longer active within this repository. type: feature request labels Feb 10, 2017
@liangfok liangfok self-assigned this Feb 10, 2017
@liangfok liangfok changed the title Add a Dragway Factory To Simplify API and Hide Details Add a Dragway Factory To Simplify the Public API and Hide Details Feb 10, 2017
@liangfok
Copy link
Contributor Author

liangfok commented Apr 12, 2017

After integrating dragway with AutomotiveSimulator, I don't think the current API is cumbersome enough to require factory support. In addition, the exposure of dragway-specific Junction, Segment, and Lane APIs has not been problematic. I shall thus close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: low type: cleanup unused team: automotive This team is no longer active within this repository.
Projects
None yet
Development

No branches or pull requests

2 participants