Book a Demo

Author Topic: Source Code GEneration- Preprocessor Directives  (Read 2847 times)

resolve

  • EA Novice
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Source Code GEneration- Preprocessor Directives
« on: July 15, 2009, 09:48:53 am »
When I generate C++ source code out from EA.
EA automatically generate some Preprocessor Directives
in header files.  for eg
#if !defined(EA_89BDD2D2_A7DB_4040_BF3F_E8F542E09F64__INCLUDED_)
#define EA_89BDD2D2_A7DB_4040_BF3F_E8F542E09F64__INCLUDED_

How do I get rid of this... I want the Preprocessor Directive to  define the header file name ... somthing like this... so how do I do it .. do I need to edit code template... if so how...?

#ifndef  PROCESS_H
#define PROCESS_H

Thanks!!!!

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Source Code GEneration- Preprocessor Directive
« Reply #1 on: July 15, 2009, 11:07:02 am »
Yes, you'll need to edit the code templates.

In the File template those declarations are generated.

It also contains a warning about not modifying it.  But as long as you keep the ImportSection, and Namespace you should be fine.

You can see that EA is using the class guid.  If you use the filename and TO_UPPER, you should be fine.

resolve

  • EA Novice
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Re: Source Code GEneration- Preprocessor Directive
« Reply #2 on: July 16, 2009, 01:35:55 am »
Thanks Simon !!! It worked now I will try to resolve other doubts.