Book a Demo

Author Topic: Generate Code for setters/getters  (Read 3108 times)

Rocket62

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Generate Code for setters/getters
« on: August 01, 2014, 05:53:15 am »
Using EA build 907
I'm fairly new to EA

I'm wanting to generate/import C++ source code between a Class Model and disk based code files and some issues have cropped up.

1) Generating code does not produce get and set methods for class attributes. I see in F11->Advanced->attribute/operations that there is no switch to turn it on. I see in F11->Advanced->C++ options to set the get and set method prefixes and I have set the "Set Prefix" to "set" and the "Get Prefix" to "". I see no other options to turn this on

2) After I make changes to my disk based code files and import/synchronize them with the Class Model the includes are not preserved. Some includes are removed and some withrelative file paths are stripped of their parent paths

Any ideas?

Thanks,
Paul

I don't want to pass quietly into the night. I want to slide in sideways kickin and screamin ...
Life is really good ... Soak it up while you can ...

SomersetGraham

  • EA User
  • **
  • Posts: 376
  • Karma: +1/-0
    • View Profile
Re: Generate Code for setters/getters
« Reply #1 on: August 01, 2014, 06:30:55 pm »
Hi
If you edit the properties for the attribute you will see a check box called 'property'. Checking this results in getters and setters being produced

HTH
Using V12

Rocket62

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: Generate Code for setters/getters
« Reply #2 on: August 01, 2014, 11:50:55 pm »
Excellent, thanks!
« Last Edit: August 02, 2014, 01:05:25 am by pleopard »
I don't want to pass quietly into the night. I want to slide in sideways kickin and screamin ...
Life is really good ... Soak it up while you can ...