lballabio / QuantLib-SWIG

QuantLib wrappers to other languages
Other
338 stars 282 forks source link

Use %extend for properties of Settings #616

Closed eltoder closed 7 months ago

eltoder commented 7 months ago

Use SWIG native way to add properties to Settings[1]. This works with all target languages using the most natural feature available (e.g. properties in Python and C# and get/set methods in Java).

For now only enable this for Python. Other languages are easy as well, except for backward compatibility concerns.

Also, deprecate get/set methods in Python.

[1] https://www.swig.org/Doc4.2/SWIG.html#SWIG_adding_member_functions near the end of the section.