java - C/C++ language file generation with Apache Velocity -
i need generate c/c++ source file , thought use velocity because have sample output file , need change dynamic parts sample. problem template file contains lot of #define's , #include's. there way disable #define , #include directives velocity? because won't needing them when generating.
i thought escaping parts of file #[[...]]# imply many changes in template file , want keep same sample file as can.
the org.apache.velocity.runtime.runtimeinstance object has removedirective(string name) method, guess have call:
runtimeinstance.removedirective("define"); runtimeinstance.removedirective("include");
to disable both directives.
Comments
Post a Comment