Book a Demo

Author Topic: C++ code customized template help  (Read 2419 times)

v01d

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
C++ code customized template help
« on: September 21, 2006, 01:32:48 am »
Hello there,
I want to modify a couple of C++ code generation templates, need
some help with it.

One thing  I want is method comment be like this :
In *.cpp
method_header ( ...)
/**
* Some comment
*/
{
...
}

In *.h
/**
* Some comment
*/
method_header();  
or as in *.cpp if method is inlined.

I've modified existing templates, that seems to work fine when generating code, but on reverse sync the comments do not get updated. Could you please check the modifications to the templates i've done:

Operation
Removed %OperationNotes%

Operation Impl
Removed %OperationNotesImpl%

Operation Declaration
added at start->
%if genOptGenComments == "T" and genOptCPPGenMethodNotesInHeader == "T"%
%OperationNotes%
%endIf%

OperationBodyImpl
added at start
\n%OperationNotesImpl%


The above positions notes/comments where I want, but doesn't reverse sync it :) Could anyone help me here ?

Thank you

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: C++ code customized template help
« Reply #1 on: September 21, 2006, 07:06:48 pm »
I don't see any reason why code generated from those templates wouldn't reverse synch.  As far as I can tell they will generate exactly the same thing as the original templates anyway.

It will cause issues when forward synchronising though.  Any time the operation signature or notes are updated the notes will be duplicated.