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 resource factory to Wayland::Resource #53

Open
romangg opened this issue May 5, 2020 · 1 comment
Open

Add resource factory to Wayland::Resource #53

romangg opened this issue May 5, 2020 · 1 comment

Comments

@romangg
Copy link
Member

romangg commented May 5, 2020

It should be possible to add a template factory method to Wayland::Resource such that the version is queried automatically from the parent resource/bind.

That could also nicely catch errors on resource creation and in that case just hand back a nullptr.

@romangg
Copy link
Member Author

romangg commented May 20, 2020

One issue is that we would need to make Wayland::Resource friend of every class being created because the ctors are private.

I think we should wait with solving this issue until we have a plan for further layering of the server library. Then the ctors would be likely all public (implementation classes in a detail namespace).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant