Jump to content
  • Advertisement
Sign in to follow this  
Tosh777

C++ Code generation

Recommended Posts

Hello, I need a tool which can generate c++ code, more precisely - for each string in some file to generate one header and one cpp file, and to add some functions in several files. 

What do you guys use in such scenarios? Of course I can write such generator myself in Python, but if you have better advice I would listen.

 

Share this post


Link to post
Share on other sites
Advertisement

Well, what more could you wish for than a multi-purpose scripting language loaded with libraries? For text processing, learning to use regex also comes in handy from time to time.

That said, being proficient in at least one scripting language is highly recommended. It's like having a Swiss army knife. You should have one and use it extensively.

Share this post


Link to post
Share on other sites

You won't find a better solution than doing it by your own. You can go from simple text processing to complex token processing solutions but I don't think there is a library for it. The reason is simple, you have to provide templates for how your code should be generated from an input language. So instead of writing template code and use the input language, printing some strings into a file is a more easy solution

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!