Add a automation script for c++ class add/rm
fix bug, improve performance