Book a Demo

Author Topic: Implementation path for C code generation  (Read 4511 times)

PaoloD

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Implementation path for C code generation
« on: November 19, 2016, 01:30:04 am »
Hello
I'm trying to generate .C files on a different path from .H files.
I would like to generate implementation files in a relative path to H ones, with the class name in the path.
I mean, if I've class MyClass1 and MyClass2 generating C:\sourcePath\include\MyClass1.h and C:\sourcePath\include\MyClass2.h  I'd like to get the implementation in relative path ..\className\className.c.
Resulting in the two implementation files C:\sourcePath\MyClass1\MyClass1.c and C:\sourcePath\MyClass2\MyClass2.c

I'm working on the "Source Path" of the Source Code Engineering options, but I'm not getting it...
Can anyone help?

Thanks!

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Implementation path for C code generation
« Reply #1 on: November 21, 2016, 08:44:37 am »
You want the source for every class in its own directory?

I don't think the automatic naming can do that. If I had the need I would write a script to set that filepaths of classes within a package. (And if necessary write an add-in to do that for elements on creation)

PaoloD

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: Implementation path for C code generation
« Reply #2 on: November 21, 2016, 09:33:05 pm »
Yes, the requirement I'm facing is to have a modular implementation for each class, bounded to its own folder.

The scripting solution was the last hope for me. I was trying some trick with macro substitution into "Source Path" in the Source Code Engineering options, but according to your answer the tool can't do that directly.