added impl code generator for template class