Commit 5ec3269d authored by Florian Hölzl's avatar Florian Hölzl
Browse files

YELLOW

refs 121
parent a9b6fb7f
......@@ -53,12 +53,14 @@ import org.fortiss.tooling.kernel.extension.data.ITransformationContext;
/**
* An {@link ITransformationProvider} for the transformation of {@link Program} into a C
* {@link SourcePackage}. The resulting package contains two sub-packages {@code inc-gen} and
* {@code src-gen}, which contain the header and implementation files respectively.
* {@code src-gen}, which contain the header and implementation files respectively. It also creates
* the two sub-packages intended for hand-written code (named {@code inc} and {@code src},
* respectively).
*
* @author hoelzl
* @author $Author$
* @version $Rev$
* @ConQAT.Rating RED Hash:
* @ConQAT.Rating YELLOW Hash: 96ACF5923AEE650C90B30A2F5BA94626
*/
public class ProgramTransformation implements ITransformationProvider {
......
<!--
$Id: package.html 894 2011-07-07 07:36:03Z ratiu $
@version $Rev: 894 $
@ConQAT.Rating GREEN Hash: 1679BAA327033FCF0FE8DA3803766831
@ConQAT.Rating YELLOW Hash: F375D477B8A3302A1FF0DB67D8C02679
-->
<body>
This package contains the generator of different features of expressions and data dictionary to C.
This package contains the generator programs to C code.
</body>
......@@ -52,10 +52,13 @@ import org.fortiss.tooling.kernel.extension.data.ITransformationContext;
* @author hoelzl
* @author $Author$
* @version $Rev$
* @ConQAT.Rating RED Hash:
* @ConQAT.Rating YELLOW Hash: FD6758DF816624253C980DDD3374D481
*/
public class DataDictionaryTransformation implements ITransformationProvider {
/** The name of the data dictionary program. */
public static String DATA_DICTIONARY_PROGRAM = "data_dictionary";
/** {@inheritDoc} */
@Override
public Class<?> getTargetClass() {
......@@ -83,7 +86,7 @@ public class DataDictionaryTransformation implements ITransformationProvider {
/** Creates the program for the data dictionary. */
private Object createProgramFor(DataDictionary dict) {
Program p = createProgram("data_dictionary");
Program p = createProgram(DATA_DICTIONARY_PROGRAM);
addBooleanType(p);
for(TypeDefinition tdef : dict.getTypeDefinitionsList()) {
addTypeDefinition(tdef, p);
......
......@@ -76,7 +76,7 @@ import org.fortiss.af3.project.model.typesystem.IType;
* @author hoelzl
* @author $Author$
* @version $Rev$
* @ConQAT.Rating YELLOW Hash: 0E6544EA2381ADDBB5F26F2708DF9797
* @ConQAT.Rating YELLOW Hash: B0B9F529C3905B57FF8628105A914FF8
*/
public class ExpressionModelElementFactory {
......
......@@ -35,7 +35,7 @@ import org.fortiss.af3.project.model.typesystem.IType;
* @author hoelzl
* @author $Author$
* @version $Rev$
* @ConQAT.Rating RED Hash:
* @ConQAT.Rating YELLOW Hash: 98B58222403131E9A1E3B2BE5979840C
*/
public class GeneratorModelElementFactory {
/** Creates a program with the given name. */
......@@ -47,8 +47,13 @@ public class GeneratorModelElementFactory {
/** Creates a variable with the given name and type. The variable is not exported. */
public static ProgramVariable createVariable(String name, IType type) {
return createVariable(name, type, false);
}
/** Creates a variable with the given name, type, and export value. */
public static ProgramVariable createVariable(String name, IType type, boolean export) {
ProgramVariable v = GeneratorFactory.eINSTANCE.createProgramVariable();
v.setExported(false);
v.setExported(export);
v.setVariable(var(name));
v.setType(type);
return v;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment