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

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -