Book a Demo

Author Topic: Want simple c++ comment "//"  (Read 10741 times)

gds

  • EA Novice
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Want simple c++ comment "//"
« on: March 19, 2014, 03:52:41 am »
?How do you generate code with the plain c++ style comments like this:

// A is for this ...
int A;

All I see is "javadoc", "cstyle" and "xml" as choices. All I would want this for is "attribute notes". The other note types are OK as javadoc.

(It also seems like cstyle and javadoc are essentially the same, at least for attribute notes.)

Again, the documentation on this subject is quite thin (unless I am just not looking at the right place).

-gds

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Want simple c++ comment "//"
« Reply #1 on: March 19, 2014, 09:26:51 am »
Try just modifying your attribute template.

Something like the following should work.

Code: [Select]
%if genOptGenComments != "T"%
%endTemplate%

$wrapLen = %genOptWrapComment%
%WRAP_COMMENT(attNotes, $wrapLen, "", "// ")%

gds

  • EA Novice
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Re: Want simple c++ comment "//"
« Reply #2 on: March 20, 2014, 12:35:06 am »
Thanks, that worked!
Yes, now that you point it out, I do see the documentation for this, but attNotes as the first parameter I would never have guessed.
Just to be clear, in my case I put this in "Attribute Notes" template.

-gds