Book a Demo

Author Topic: C++ structs/Code engineering  (Read 4402 times)

mbc

  • EA User
  • **
  • Posts: 237
  • Karma: +1/-0
  • Embedded software developer
    • View Profile
C++ structs/Code engineering
« on: September 02, 2002, 04:18:43 am »
I found out by accident, that C++ structs reverse engineer to classes with stereotype <<struct>> and forward engineer back into structs. I find this to be a very nice feature.

However, when I declare a new struct or struct member inside EA, the members will be declared as structs too when forward engineering.

That is, a class TestStruct1 with stereotype <<struct>> and two attributes Var1: int and Var2:char generates this code:

struct TestStruct1
{
   struct int Var1;
   struct char Var2;
};

where I would expect:

struct TestStruct1
{
   int Var1;
   char Var2;
};

Can anyone explain this behaviour, and/or tell me how to get EA to generate structs my way?

flyingrobots

  • EA Novice
  • *
  • Posts: 19
  • Karma: +0/-0
  • I love YaBB 1 Gold!
    • View Profile
Re: C++ structs/Code engineering
« Reply #1 on: September 13, 2002, 11:37:52 am »
I see this too...anyone know why it does this?