Book a Demo

Author Topic: Dependency to C++ code  (Read 2679 times)

Bujitsu

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Dependency to C++ code
« on: November 05, 2004, 06:12:17 pm »
Hi,

What does the dependency arrow represent when I generate the C++ code?

Is there a table that would show what each of these symbols would represent?

Cheers

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Dependency to C++ code
« Reply #1 on: November 07, 2004, 05:04:24 pm »
Hi,

In the default code generation templates dependencies do not result in anything in the code.  However, you can modify the templates so that it does generate import statements (#includes for C++)

Please refer to the following forum thread where I previously gave detail for how this works.

http://www.sparxsystems.com.au/cgi-bin/yabb/YaBB.cgi?board=general;action=display;num=1097572368;start=0#0

Although it was for Java the difference is defining the appropriate template for a #include and choosing to put it in the "Import Section" or "Import Section Impl" template. (Header or cpp file)

The Import template will look something like this.

Code: [Select]
%PI=""%
$currentFile = %fileName%
$file = %importFileName%
%if $file == ""%
$file = %importClassName% + ".h"
%endIf%
%if $file != $currentFile%
#include "$file"
%endIf%

There is no table to describe what generates as what because it is configurable.

Simon