C++ port of Javamorph