C++ generated code class inheritance
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Antonio Niro
il 17 Gen 2023
Commentato: Mark McBroom
il 25 Gen 2023
Hi, I'm trying to use class C++ inheritance in my generated code. I have a certain Simulink model, and I'm able to generate code from it as a C++ class. I'd like to have the generated class to be the child of a second hand-written class. If my model is called "my_model", and my parent class i called "parent", i want to obtain something like
class my_model: public parent
I tried to implement this by modifing the .tlc file customization template file, but if I want to obtain C++ class from the model I must use the default tlc file. Is it possible to set up embedded coder to obtain what I'm looking for?
Thanks in advance,
Antonio.
P.S. I'm using Simulink R2021b.
0 Commenti
Risposta accettata
Mark McBroom
il 25 Gen 2023
This is currently not possible with Embedded Coder.
Thanks.
Mark.
2 Commenti
Mark McBroom
il 25 Gen 2023
That is the best approach. You can configure your script to automatically run after code is generated via the "Post code generation command" configuration setting.
Thanks.
Mark.
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Simulink Coder in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!