Hi Bjoern,Thank you for your answer. This is a good suggestion, but I think it is more user-friendly to have properties rather than getters... this is why I was wondering if this was possible with SWIG.On Thu, Mar 28, 2013 at 10:51 AM, Björn Simon <firstname.lastname@example.org> wrote:
Why not having the member variables as private/protected and provide getter/setter for Username and only getter for Password?
So using DataSource more as a class than as a struct.
I'm wrapping C++ to Python using SWIG. How can I tell SWIG that a property is read-only?
std::string Password; // Read-only?