PetrPPetrov / beautiful-capi

Beautiful Capi is a tool which automates the creation of compiler-independent and binary compatible C++ libraries across different C++ compilers
GNU General Public License v3.0
33 stars 4 forks source link

Add ability to wrap struct(or marked as public) fields as property #82

Open RudenkoSergej opened 5 years ago

RudenkoSergej commented 5 years ago

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:

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