-
Notifications
You must be signed in to change notification settings - Fork 415
Implementation Methods for RRGraphView API #1740
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
Comments
I'd go for 1 or 2 (no strong preference between them on my part). I don't like #3 as the cast to RRNodeId is pretty mechanical and adding a temporary for it just creates additional names to keep track of. In some cases you may be able to pass in an RRNodeId (change the type of the input parameter) to avoid the conversion to RRNodeId. If that can be done without undue effort it is better, as it expands the type-checking back to the caller, where it is more useful. |
I agree with @vaughnbetz that 1 and 2 are better than 3. |
I say we go for #2 then to make future refactoring easier, and since you find it more readable Ethan. |
We have decided on method #2 for now. |
Overview
In my implementation of API function calls for the RRGraphView class, I have come up with several methods that could be used. Before adding several hundreds of function calls, I figured it would be good to have some input. The three methods are included below. I am currently leaning towards method 2 or 3. Soon after Xifan's PR (#1693) is merged, I will make a PR which will add these calls to
RRGraphView::node_type(RRNodeId node)
.@vaughnbetz, @hzeller, @tangxifan, @nelsobe, which of these methods do you think is best? Or is there another method that is better?
API Implementation Variations (check_route.cpp starting at line 200)
1. Single Line Replacement
2. Addition of
const auto& rr_graph
3. Addition of
const auto& rr_graph
and an additional variable for theRRNodeId
The text was updated successfully, but these errors were encountered: