fixed class inheritance in generated cpp code