modify codegen to support enum and access , remove base of template class code generated