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

Create a Back Door to mx::core::DocumentPtr #45

Closed
webern opened this issue Jan 25, 2020 · 1 comment
Closed

Create a Back Door to mx::core::DocumentPtr #45

webern opened this issue Jan 25, 2020 · 1 comment
Labels
feature new feature request

Comments

@webern
Copy link
Owner

webern commented Jan 25, 2020

A user may want to use mx::api for most things, but need to get at mx::core::DocumentPtr for some tweaking. Provide a way to do this without exposing mx::core symbols in any mx::api headers.

Requested here #44 but leaving that issue to be about the specific key signature issue.

@webern webern changed the title Create a Back Door to the mx::core::DocumentPtr Create a Back Door to mx::core::DocumentPtr Jan 26, 2020
@webern webern added the feature new feature request label Jan 26, 2020
@webern
Copy link
Owner Author

webern commented Jan 26, 2020

Looks like I already did this:

mx::core::DocumentPtr getDocument( int documentId ) const;

The trick is that DocumentPtr is only forward declared in this file. So as long as you don't touch that function, you don't need any headers from private/mx/core. If you include those private headers, then you can use this function to access the underlying document (and change it since everything is a sharedptr).

@webern webern closed this as completed Jan 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature new feature request
Projects
None yet
Development

No branches or pull requests

1 participant