support object getters/setters in c++