Book a Demo

Author Topic: typedef struct  (Read 10447 times)

Alec555

  • EA Novice
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
typedef struct
« on: June 14, 2014, 12:11:39 am »
Hello,

I'm pretty new to EA and I've a simple problem with code generation (C). I want to use typedef statement to define a new name. For example I want to get following code:

Code: [Select]
typedef struct config_tag config;

struct config_tag
{
      int abc;
} ;

So I've created a new UML-diagram, which contains typedef class "config" and struct class "config_tag". Both classes are connected by generalization. After the code generation I'm missing the stereotype struct after the keyword typedef. I'm getting following result:

Code: [Select]
typedef config_tag config;

struct config_tag
{
      int abc;
} ;

My question is how can I enable to print struct-keyword after the typedef-keyword during the code generation?

I would be appreciated for your help!

greetings
Alec

Makulik

  • EA User
  • **
  • Posts: 400
  • Karma: +0/-0
    • View Profile
Re: typedef struct
« Reply #1 on: June 14, 2014, 01:25:12 am »
Check the following document

http://www.sparxsystems.com/downloads/resources/booklets/uml_code_engineering.pdf

There are several options, stereotypes and tags, that control code generation for C and C++ in detail.

Best regards,
Günther