Customizing code generation for Doxygen syntax

I’m trying to get all the other developers at the company I work for on-board with VP. Our company bought a license for me, and I’m working on a demo for the rest of the development team. The round-trip C++ capability is what won me over, and will win over the rest of our team, IF I can come up with solutions to a couple issues.

The main issue I’m having at the moment is that the generated documentation is very ugly, with parameter comments inlined with the parameters. This makes the code virtually unreadable. Our existing codebase is heavily documented in Doxygen syntax, with parameter information in the comment block preceding the function, such as:


  • @brief Returns the sum.
  • @param[in] op1 The first number to add.
  • @param[in] op2 The second number to add.
  • @return double The sum of the two numbers.
    double sum(double op1, double op2);

I realize that there are code generation templates which can be modified to alter the generated output, but the documentation I’ve found on your website regarding the template system is very lacking. I’ve searched the forum, and found many others asking the same question, but have yet to find a helpful response. Googling hasn’t produced anything either.

I’d appreciate a simple explanation of how to alter a c++ template to generate the parameter comments Doxygen style, as shown above. Or if another developer has already tackled this issue, I’d greatly appreciate being sent the templates. It would be nice if VP had a repository of templates for different coding styles.

Thank you

Hello dvstate,

Thank you for your message. Regarding to the C++ Round-trip code engineering, I’m very sorry that at the moment the format of the outputted source file are not customizable. But the comment of parameters do looks like a problem. Our engineers are checking on it and I’ll keep you post once there are any update.

Regarding to the code generation template, it is only used by the Instant Generator. The Instant Generator is a one-off code generation process which will always overwrite your existing source code (which means your implementation will be loss). We not recommend user to use both Instant Generator and round-trip engineering at the same time.

Feel free to contact me for any questions and wish you have a good day!

Best regards,
Rain Wong