generator: delete all of the cpp code and make use of cpp model