Book a Demo

Author Topic: How can I turn off code generation for a class?  (Read 4962 times)

mbc

  • EA User
  • **
  • Posts: 237
  • Karma: +1/-0
  • Embedded software developer
    • View Profile
How can I turn off code generation for a class?
« on: September 03, 2002, 02:48:47 am »
This may be a simple question, but I haven't been able to find out how to do it.
How can I turn off code generation for individual classes? I want to be able to generate a whole package, but exclude some classes. If I have never generated the class (i.e. not specified a file name for it) this works fine. But after I have generated it once, I don't know how to turn it off again.

By the way, are there many people out there using EA to generate C++? I don't seem to be getting many replies to my long line of C++ generation questions in this forum.

kelly_sumrall

  • EA User
  • **
  • Posts: 73
  • Karma: +0/-0
    • View Profile
Re: How can I turn off code generation for a class
« Reply #1 on: September 04, 2002, 05:39:31 am »
Hello,

I understand not having any response, so I did some research to your problem.  Open you project in Access.  You will find a t_object table.  In this table, you will find some fields that start with Genxxx (GenType, GenFile, ...).  I could be wrong, but I think you could manipulate this data, such as removing the GenFile data, and solve your delima.  Back everything up before trying, this is an untested theory.  If there is a better way, maybe someone else in the group will respond.

Good Luck
Kelly Sumrall

Even though curiosity killed the cat, it still had eight lives left.

mbc

  • EA User
  • **
  • Posts: 237
  • Karma: +1/-0
  • Embedded software developer
    • View Profile
Re: How can I turn off code generation for a class
« Reply #2 on: September 04, 2002, 05:43:26 am »
Thank you very much for your response and your idea. I had thought about something along these lines myself also. I was hoping there was a more "legitimate" solution to the problem, or that I might just inspire a change in a future build. I think Sparks and friends usually read this forum too.
But I think I might give your method a try.

sparks

  • EA Administrator
  • EA User
  • *****
  • Posts: 691
  • Karma: +4/-2
    • View Profile
Re: How can I turn off code generation for a class
« Reply #3 on: September 04, 2002, 06:25:29 am »
Hello,

To do a selective code generation do the following,  select 'Code Engineering' -> 'Generate Source Code' from the context menu of the package in the tree. You will then be  presented with a list of classes in that package, you can now select any class you want to generate code for and any that you don't want should remain unselected.

To clear the GenFile field of a class that Kelly has referred, click on the object in a diagram and then using the object properties docked bar, delete the value in 'Filename'.

Paul Mathers

mbc

  • EA User
  • **
  • Posts: 237
  • Karma: +1/-0
  • Embedded software developer
    • View Profile
Re: How can I turn off code generation for a class
« Reply #4 on: September 04, 2002, 06:29:12 am »
Great, thanks!
In my situation, I prefer the last solution, because that way I don't have to select the classes each time I generate. I have been looking for a place to delete the file name, but I hadn't been able to find it.