sml to cpp: use relationship container for inheritance

- fix bug with original parents
patches: add remove parent and original parent