Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.etrice.generator.java/src/templates/DataClass.xpt')
-rw-r--r--plugins/org.eclipse.etrice.generator.java/src/templates/DataClass.xpt73
1 files changed, 0 insertions, 73 deletions
diff --git a/plugins/org.eclipse.etrice.generator.java/src/templates/DataClass.xpt b/plugins/org.eclipse.etrice.generator.java/src/templates/DataClass.xpt
deleted file mode 100644
index f03ca2157..000000000
--- a/plugins/org.eclipse.etrice.generator.java/src/templates/DataClass.xpt
+++ /dev/null
@@ -1,73 +0,0 @@
-«REM»
-/*******************************************************************************
- * Copyright (c) 2010 protos software gmbh (http://www.protos.de).
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * CONTRIBUTORS:
- * Thomas Schuetz and Henrik Rentz-Reichert (initial contribution)
- *
- *******************************************************************************/
-«ENDREM»
-«IMPORT room»;
-«IMPORT etricegen»;
-
-«EXTENSION org::eclipse::etrice::generator::extensions::Extensions»
-«EXTENSION extensions::Extensions»
-«EXTENSION org::eclipse::xtend::util::stdlib::io»
-
-«DEFINE dataClass FOR Root»
-
-«FOREACH this.usedDataClasses AS dc»
-
-«("generating "+getPath(dc)+dc.name+".java").info()»
-
-«FILE getPath(dc)+dc.name+".java"»
-package «getPackage(dc)»;
-
-«LET this.getReferencedModels(dc) AS models»
-«FOREACH models AS model»import «model.name».*;
-«ENDFOREACH»
-«ENDLET»
-
-«IF dc.imports.size>0»
-// user imports
-«FOREACH dc.imports AS imp»import «imp.importedNamespace».*;
-«ENDFOREACH»«ENDIF»
-
-public class «dc.name»«IF dc.base!=null» extends «dc.base.name»«ENDIF» {
- «EXPAND ProcedureHelpers::Attributes FOR dc.attributes»
- «EXPAND ProcedureHelpers::AttributeSettersGetters FOR dc.attributes»
- «EXPAND ProcedureHelpers::Operations FOR dc.operations»
-
- // default constructor
- public «dc.name»() {
- «FOREACH dc.attributes AS a-»
- «IF a.defaultValueLiteral!=null-»
- «IF a.size==0»«a.name» = «a.defaultValueLiteral»;«ENDIF»
- «ELSEIF a.type.type!=null-»
- «a.name» = new «a.type.type.name»();
- «ENDIF-»
- «ENDFOREACH-»
- }
-
- // deep copy
- public «dc.name» deepCopy() {
- «dc.name» copy = new «dc.name»();
- «FOREACH dc.attributes AS a-»
- «IF a.type.type!=null-»
- copy.«a.name» = «a.name».deepCopy();
- «ELSE-»
- «IF a.size==0»copy.«a.name» = «a.name»;«ELSE»for (int i=0;i<«a.size»;i++){copy.«a.name»[i]=«a.name»[i];}«ENDIF»
- «ENDIF-»
- «ENDFOREACH-»
- return copy;
- }
-};
-«ENDFILE»
-«ENDFOREACH»
-«ENDDEFINE»
-
-

Back to the top