override default c++ class template in visual studio 2010 -
when create new c++ class in visual studio 2010, generates class template code. how can modify template suit own needs ?
one problem finding info of information creating templates .net , process different visual c++. answer not want hear because involves editing javascript code rather editing template file. it's possible can create brand new wizard uses template file, 1 way modify default template without doing that. modifying wizard code involves editing javascript file:
c:\program files\microsoft visual studio 10.0\vc\vcwizards\codewiz\generic\class\scripts\1033\default.js
the javascript uses codemodel manipulate (or generate, in case) source code. inside file there onfinish
function can use modify class details output. see line in file:
var newclass = ocm.addclass(strclassname, strheader, vscmaddpositionend, "", "", vscmaccessdefault);
to add new function like:
newclass.addfunction("myfunction", vscmfunctionfunction, vscmtyperefvoid, vscmaddpositionend, vscmaccesspublic, strimpl);
you can read here:
reference documentation:
Comments
Post a Comment