Book a Demo

Author Topic: Codegen Template: insert \note for doxygen  (Read 2443 times)

doener365

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Codegen Template: insert \note for doxygen
« on: March 18, 2011, 02:00:47 am »
Hi all,

I want to change the codegen templates to generate comments in doxygen format (C-Code). When I insert
Code: [Select]
\notein the template the \n is converted to linebreak in generated code. Is there a way to "escape" \n?
I also want to insert \n in some comments, e.g.:
Code: [Select]
/***********************************************************************//**

      \file    %fileName%

      \brief   %classNotes%

      \author  %classAuthor%

      \date        %eaDateTime%

      \note    (C) Copyright by... \n\n
            Contents and presentations are protected world-wide.\n
             Any kind of using, copying etc. is prohibited without prior permission. \n
             All rights - incl. industrial property rights - are reserved.

****************************************************************************/\n

Thanks for your help,
Thorsten

doener365

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: Codegen Template: insert \note for doxygen
« Reply #1 on: March 23, 2011, 06:07:18 pm »
Here is the solution from support:
In places where you wish to use a literal backslash, it is recommended to instead use the following code to store a backslash character as a variable, and then use this variable wherever you wish to output a backslash.
 
$bs = "\\"
$bs = %LEFT($bs, 1)%