-
Notifications
You must be signed in to change notification settings - Fork 61
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
Clean-up catalogue extension. #2409
Clean-up catalogue extension. #2409
Conversation
@@ -96,7 +96,7 @@ class ARB_ARBOR_API mechanism_catalogue { | |||
} | |||
|
|||
// Copy over another catalogue's mechanism and attach a -- possibly empty -- prefix | |||
void import(const mechanism_catalogue& other, const std::string& prefix); | |||
void extend(const mechanism_catalogue& other, const std::string& prefix = ""); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice. I think I understood this perfectly hehe
@@ -114,19 +113,19 @@ struct catalogue_state { | |||
catalogue_state() = default; | |||
|
|||
catalogue_state(const catalogue_state& other) { | |||
import(other, ""); | |||
extend(other, ""); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the difference between import and extend, since it is used everywhere
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I renamed the method to avoid clashing with an upcoming in the C++ language (modules
will bring import
).
So, now all uses of catalogue::import
(and catalogue_state::import
) must be re-written as extend
instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
got it!
@@ -114,19 +113,19 @@ struct catalogue_state { | |||
catalogue_state() = default; | |||
|
|||
catalogue_state(const catalogue_state& other) { | |||
import(other, ""); | |||
extend(other, ""); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
got it!
catalogue::import
tocatalogue::extend
asimport
will likely be a reserved word due to modules