Book a Demo

Author Topic: Comments away after source file import - c++  (Read 2077 times)

Elmi

  • EA Novice
  • *
  • Posts: 6
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Comments away after source file import - c++
« on: March 24, 2009, 05:14:06 am »
Hi guys,

When generating source code I'm using own genration templates to get Doxygen compliant comments.
If I now want to reimport the source files, all comments are wrong.

Example of a function header after export:
/*--------------------------------------------------------------*//**
\brief          Little Description
\param [in] newVal : Description of newVal
*//*---------------------------------------------------------------*/
CMyClass::MyFunction(const int newVal)
{
....

After import and export again:
/*--------------------------------------------------------------*//**
\brief          --------------------------------------------------------------
\param [in] newVal :
*//*---------------------------------------------------------------*/
CMyClass::MyFunction(const int newVal)
{
....

The function description is wrong and the paramter description is empty.
What can I do to solve this problem.

Best regards
Elmar
« Last Edit: March 24, 2009, 05:16:08 am by Elmi »

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Comments away after source file import - c++
« Reply #1 on: March 24, 2009, 10:25:42 am »
Well, here's what is happening.

EA takes the previous comment before a code element to use as the notes for the corresponding model element.  This is highlighted below.

/*--------------------------------------------------------------*//**
\brief          Little Description
\param [in] newVal : Description of newVal
*//*---------------------------------------------------------------*/
CMyClass::MyFunction(const int newVal)
{
....


So your note will be set to

---------------------------------------------------------------

So then you generate back out again, and it puts that value into your templates and gets the output you described.  I don't know what happened to your parameter notes.

As I have mentioned a few times on the forum.  Changing the templates to generate Doxygen is easy.  But EA won't reverse engineer or synchronize with this properly.