Book a Demo

Author Topic: .h File Only for Code Gen  (Read 2576 times)

MarkKozel

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
.h File Only for Code Gen
« on: April 20, 2005, 12:26:37 pm »
How do I add a class to EA so that it will generate a .h file only?

In my C++ project, I need to create a file for const values that will be included in other files.  When I add a class to EA, I get the class structure and a .cpp file.

-Thank, Mark
-Mark Kozel
"The world is a dangerous place, not because of those who do evil, but because of those who look on and do nothing."
--Albert Einstein

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: .h File Only for Code Gen
« Reply #1 on: April 20, 2005, 04:42:35 pm »
The built in C++ language will nearly always create a .cpp file (or whatever extension you give in the options).

A possible workaround to avoid this is to create your own language (Configuration | Language Datatypes) and copy the templates you want from the C++ templates (Configuration | Code Generation Templates)

Another helpful point is that if C++ is your default language (or the default language is none) and you do a package generation containing your custom language, EA will automatically use the .h extension for your classes when auto generating file paths.

Simon