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 ability to wrap struct(or marked as public) fields as property #82

Open
RudenkoSergej opened this issue Oct 25, 2018 · 0 comments
Open
Assignees

Comments

@RudenkoSergej
Copy link
Contributor

We already have the "field_name" attribute for properties, which allows get/set methods use the public field of the impl class. But we don’t have a way to generate public fields for cases where it’s necessary to wrap the public interface wrap and impl classes to match.

It can be implement by a template class that:

  • Arguments of the emplate - wrap class and field type.
  • The constructor accepts a pointer to the wrap class pointer, and pointers on the Get and Set wrap class methods.
  • Has overrided assignment and conversion operators for field type, thats will use Get and Set methods pointers.

Example how it works:
https://ideone.com/SsmKlg

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