Book a Demo

Author Topic: prefix for fields and finalize method  (Read 2566 times)

FrankB

  • EA Novice
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
prefix for fields and finalize method
« on: October 25, 2011, 07:24:53 pm »
Hello,

I'm trying to configure EA to not generate the finalize() method - but I can't find any setting. Next I don't like the m_ prefix for fields. Where can I change / configure that?

Thanks in advance
Frank

Sunshine

  • EA Practitioner
  • ***
  • Posts: 1353
  • Karma: +121/-10
  • Its the results that count
    • View Profile
Re: prefix for fields and finalize method
« Reply #1 on: October 26, 2011, 11:18:39 am »
Good question. At first I thought this was going to be easy to answer as in my dim distant memory I thought this was a simple tick box in the options dialog. Perhaps it was in an older version or another tool but when I looked in V8.0 I couldn't find it anywhere at first.  :(

However did find it eventually. Tools>Options>Source code engineering> Attributes/Operations. Change the field m_$LinkClass to simply $LinkClass

If that doesn't work for you then the only suggestion I have is look at the code generation template and change the "Attribute Declaration" and "Linked Attribute Declaration" functions so it generates the fields how you like. It will probably take you a little while to get your head around the template language.

Not sure about what to do on the Finalize() function. Maybe can fix it in the code generation template somewhere but it wasn't obvious where.

« Last Edit: October 26, 2011, 11:39:46 am by phenzell »
Happy to help
:)

FrankB

  • EA Novice
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Re: prefix for fields and finalize method
« Reply #2 on: October 26, 2011, 07:00:05 pm »
Thanks a lot Sunshine,

the m_$LinkClass stuff worked fine and I found out where the config dialog for the destructor is: Tools | Options | Source Code Engineering | Object Lifetimes.

Regards
Frank