1
General Board / C Code Generation typedef struct
« on: July 11, 2013, 09:45:43 pm »
Hi @ all,
I've got a Problem regarding the Code Generation of C-Code
The following Class Combination will get me follwing Code Fragment
--------------- ---------------
| <<typedef>> | | <<struct>> |
| Class1 |----------|> | Class2 |
---------------- |--------------|
| Attr1: int |
----------------
Sorry for the crude graphics but I don't have a space available where I can put a screenshot right now.
The connection between the 2 Classes is a Generalization. This will produce the follwoing code:
Since this Code will not compile I'm searching for the right command to add the missing
typedef struct Class2 Class1;
(Sorry nesting color inside Code obviously doesn't work here
)
Can anyone point me in the right direction because all I've found up to this point is that somewhere in the "Linked Class Base" Template before the %linkParentName% I should have %linkParentStereotype% but this Attribute doesn't exist
.
Any help is appreciated
Best regards
Dominik
I've got a Problem regarding the Code Generation of C-Code
The following Class Combination will get me follwing Code Fragment
--------------- ---------------
| <<typedef>> | | <<struct>> |
| Class1 |----------|> | Class2 |
---------------- |--------------|
| Attr1: int |
----------------
Sorry for the crude graphics but I don't have a space available where I can put a screenshot right now.
The connection between the 2 Classes is a Generalization. This will produce the follwoing code:
Code: [Select]
struct Class2
{
int Attr1;
};
typedef Class2 Class1;
Since this Code will not compile I'm searching for the right command to add the missing
typedef struct Class2 Class1;
(Sorry nesting color inside Code obviously doesn't work here

Can anyone point me in the right direction because all I've found up to this point is that somewhere in the "Linked Class Base" Template before the %linkParentName% I should have %linkParentStereotype% but this Attribute doesn't exist

Any help is appreciated
Best regards
Dominik