How to model extern include C

Please use this forum for open discussions about Bouml.
Merci d'utiliser ce forum pour des discussions ouvertes à propos de Bouml.

How to model extern include C

Postby gramm » Thu 3 Jan 2019 17:14

Hello,
Is there a way using a dependency relationship with the import stereotype to generate a C++ include within an "extern C" keyword:

Code: Select all
extern "C" {
#include "MyLegacyInclude.h"
}


Thanks
gramm
 
Posts: 1
Joined: Thu 3 Jan 2019 16:57

Re: How to model extern include C

Postby Bruno Pagès » Thu 3 Jan 2019 18:44

Hello,

If the dependency is between classes and the target class is declared "external" in C++ you can modify the default form generated to #include the file with what you want, so to have the extern "C" {..}

Between artifacts you cannot specify the code generated for the dependency, but of course you can edit the C++ definition of the including artifact to add the extern "C" {..}
}

Best regards
ImageAuthor of Bouml
Bruno Pagès
 
Posts: 622
Joined: Mon 20 Feb 2012 09:23
Location: France


Return to Open discussions / Discussions ouvertes

Who is online

Users browsing this forum: No registered users and 1 guest

cron