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 the AppendDiscoveryResult to NdrRegistry #1810

Merged

Conversation

DuncanHopkinsFoundry
Copy link

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.

  • [X ] I have submitted a signed Contributor License Agreement

@jilliene
Copy link

Filed as internal issue #USD-7288

/// 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);
Copy link
Member

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"?

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.
Copy link
Member

@spiffmon spiffmon Jun 2, 2022

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?

Choose a reason for hiding this comment

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

Done

void AppendDiscoveryResult(NdrNodeDiscoveryResult&& discoveryResult);

/// Copy version of the method above.
/// For performance reasons, one should prefer to use the move version.
Copy link
Member

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"?

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.
@pixar-oss pixar-oss merged commit 0fc5bb3 into PixarAnimationStudios:dev Jun 25, 2022
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.

5 participants