-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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 the AppendDiscoveryResult to NdrRegistry #1810
Add the AppendDiscoveryResult to NdrRegistry #1810
Conversation
Filed as internal issue #USD-7288 |
pxr/usd/ndr/registry.h
Outdated
/// This method will not immediately spawn a parse call which will be | ||
/// deferred until a GetNode*() method is called. | ||
NDR_API | ||
void AppendDiscoveryResult(NdrNodeDiscoveryResult&& discoveryResult); |
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.
"Append" implies knowledge that we're storing DR's in a list, which is an implementation detail we'd rather not be locked into. Can we change this to "Add"?
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.
Done
NDR_API | ||
void AppendDiscoveryResult(NdrNodeDiscoveryResult&& discoveryResult); | ||
|
||
/// Copy version of the method above. |
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.
Can we use the doxygen \overload
directive, here?
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.
Done
pxr/usd/ndr/registry.h
Outdated
void AppendDiscoveryResult(NdrNodeDiscoveryResult&& discoveryResult); | ||
|
||
/// Copy version of the method above. | ||
/// For performance reasons, one should prefer to use the move version. |
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.
Can we say "prefer to use the rvalue reference form"?
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.
Done
This method allows the client to explicitly set additional discovery results that would NOT be found through the plugin system. For example to support lazily-loaded plugins which cannot be easily discovered in advance.
Append implies that discovery results are stored in a list while add is more generic and does not expose implementation details. This commit also improves these methods' documentation.
92566ab
to
aca3e7c
Compare
This method allows the client to explicitly set additional discovery
results that would NOT be found through the plugin system. For example
to support lazily-loaded plugins which cannot be easily discovered in
advance.