Code generation templates
Overview of code generation templates
Templates are used to visualize the structure of generated C# source and to easily modify the C# code produced.
For more information on template editors, please see the Objecteering MDA Modeler User Guide.

Figure 74. C# generation template
Each template element is loaded with a file zone to generate. Roles are summed up in the table below.
|
The ...
template element |
is used
to generate... |
|
ClassDoc |
the C#doc type documentation relative to the class |
|
PackageName |
the name of the package in which the class is defined. |
|
Import |
the processing of the imported classes and packages. |
|
UtilVector |
the import C#.util* of the package when an attribute, an association or a method parameter has the Vector, Stack or Hashtable type. |
|
StandardImport |
the processing use links between packages translated by a package import used for all the classes of the user package. |
|
ImportWithTaggedValue |
the processing of the C#Import tagged values present on the class or the package to which the class belongs. |
|
HeaderText |
the C#Header type texts. |
|
ClassHeader |
the class header. |
|
ClassModifiers |
the abstract, final, visibility. |
|
ClassName |
the name of the class. |
|
Extends |
the processing of the generalizations. |
|
Standard |
the generalization for a generalization link on a model. |
|
ExtendsWithTaggedValue |
the translation of the {C#Extends} tagged values. |
|
Implements |
the processing of the interface implementations. |
|
StandardImplements |
the implementation for an implementation link on the model. |
|
ImplementsWithTaggedValue |
the translation of the {C#Implements} tagged values. |
|
ImplementsWithEnumerations |
the implementations which correspond to the enumerations used in the class. |
|
ClassBody |
the class body (see below). |
|
DataTypes |
the generation into non-public classes of types defined in the class. |
|
Enumerations |
the generation in the form of interfaces of enumerations defined in the class. |
|
NonPublicClasses |
the generation of non-public classes. |
|
BottomText |
the C#Bottom type texts. |
Detail of ClassBody (part 1)
|
The ...
item |
represents
... |
|
ClassBody |
the class body |
|
StaticField |
the static fields |
|
NonStaticField |
the non static fields |
|
PublicField |
the public visibility fields |
|
ProtectedField |
the protected visibility fields |
|
FriendlyField |
the friendly visibility fields |
|
PrivateField |
the private visibility fields |
|
Attribute |
the attributes |
|
AttributeDoc |
the C#doc text for an attribute |
|
AttributeDeclaration |
the declaration of an attribute |
|
AttributeAccessors |
the accessors and the modifiers on an attribute |
|
AssociationEnd |
the associations |
|
AssociationDoc |
the C#doc text for an association |
|
AssociationDeclaration |
the declaration of the attribute corresponding to an association |
|
AssociationAccessors |
the accessors and the modifiers on the attribute corresponding to an association |
|
InnerClasses |
the internal classes |
|
Constructors |
the constructors |
|
Destructor |
the finalize method |
|
PublicMethod |
the public methods |
|
ProtectedMethod |
the protected methods |
|
FriendlyMethod |
the friendly methods |
|
PrivateMethod |
the private methods |
|
MainMethod |
The main method |
|
Invariant |
the invariant() method |
|
MembersText |
the C#Members notes |
Detail of ClassBody (part 2)
|
The
command ... |
is
used to ... |
|
Constructors |
the constructors |
|
Constructor |
a constructor |
|
Destructor |
the destructor |
|
DestructorHeader |
the declaration of the finalizer |
|
PublicMethod |
a class's public methods |
|
Method |
a method |
|
MethodDoc |
the generation of a C#doc text for a method |
|
MethodModifiers |
the visibility, static, final, abstract, synchronized, native |
|
NoReturnParameter |
the type of return (void) |
|
ReturnParameter |
the type of return parameter |
|
MethodName |
the method's name |
|
NoParameters |
the section related to the parameters of a method when it doesn't have any |
|
Parameters |
the section related to the parameters of a method when it has some |
|
ListOfParameters |
the parameters |
|
Parameter |
a parameter |
|
Exceptions |
the declarations of exception launching |
|
MethodBody |
the method's body |
|
BodyHeader |
the C#Super type texts |
|
PreConditions |
the pre-conditions of the C#code type model |
|
Body |
the method's implementation, generation of a C#Code type model implementation |
|
PostConditions |
the generation of the post-conditions of the C#Code type model |
|
BodyBottom |
the generation of a C#Returned text type |