]> gerrit.simantics Code Review - simantics/sysdyn.git/commitdiff
git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@13134 ac1ea38d-2e2b...
authorniemisto <niemisto@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Wed, 18 Nov 2009 13:40:38 +0000 (13:40 +0000)
committerniemisto <niemisto@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Wed, 18 Nov 2009 13:40:38 +0000 (13:40 +0000)
19 files changed:
org.simantics.sysdyn/.classpath [new file with mode: 0644]
org.simantics.sysdyn/.hgignore [new file with mode: 0644]
org.simantics.sysdyn/.project [new file with mode: 0644]
org.simantics.sysdyn/.settings/org.eclipse.jdt.core.prefs [new file with mode: 0644]
org.simantics.sysdyn/META-INF/MANIFEST.MF [new file with mode: 0644]
org.simantics.sysdyn/build.properties [new file with mode: 0644]
org.simantics.sysdyn/src/org/simantics/sysdyn/SysdynResource.java [new file with mode: 0644]
org.simantics.sysdyn/src/org/simantics/sysdyn/modelica/ModelicaWriter.java [new file with mode: 0644]
org.simantics.sysdyn/src/org/simantics/sysdyn/representation/Auxiliary.java [new file with mode: 0644]
org.simantics.sysdyn/src/org/simantics/sysdyn/representation/Cloud.java [new file with mode: 0644]
org.simantics.sysdyn/src/org/simantics/sysdyn/representation/Configuration.java [new file with mode: 0644]
org.simantics.sysdyn/src/org/simantics/sysdyn/representation/Dependency.java [new file with mode: 0644]
org.simantics.sysdyn/src/org/simantics/sysdyn/representation/Flow.java [new file with mode: 0644]
org.simantics.sysdyn/src/org/simantics/sysdyn/representation/IElement.java [new file with mode: 0644]
org.simantics.sysdyn/src/org/simantics/sysdyn/representation/Stock.java [new file with mode: 0644]
org.simantics.sysdyn/src/org/simantics/sysdyn/representation/Valve.java [new file with mode: 0644]
org.simantics.sysdyn/src/org/simantics/sysdyn/representation/Variable.java [new file with mode: 0644]
org.simantics.sysdyn/src/org/simantics/sysdyn/representation/visitors/ElementVisitorVoidAdapter.java [new file with mode: 0644]
org.simantics.sysdyn/src/org/simantics/sysdyn/representation/visitors/IElementVisitorVoid.java [new file with mode: 0644]

diff --git a/org.simantics.sysdyn/.classpath b/org.simantics.sysdyn/.classpath
new file mode 100644 (file)
index 0000000..8a8f166
--- /dev/null
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<classpath>\r
+       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>\r
+       <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>\r
+       <classpathentry kind="src" path="src"/>\r
+       <classpathentry kind="output" path="bin"/>\r
+</classpath>\r
diff --git a/org.simantics.sysdyn/.hgignore b/org.simantics.sysdyn/.hgignore
new file mode 100644 (file)
index 0000000..73df90f
--- /dev/null
@@ -0,0 +1,5 @@
+syntax: regexp\r
+^bin/\r
+\r
+syntax: glob\r
+*.svn/*
\ No newline at end of file
diff --git a/org.simantics.sysdyn/.project b/org.simantics.sysdyn/.project
new file mode 100644 (file)
index 0000000..05d4439
--- /dev/null
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<projectDescription>\r
+       <name>org.simantics.sysdyn</name>\r
+       <comment></comment>\r
+       <projects>\r
+       </projects>\r
+       <buildSpec>\r
+               <buildCommand>\r
+                       <name>org.eclipse.jdt.core.javabuilder</name>\r
+                       <arguments>\r
+                       </arguments>\r
+               </buildCommand>\r
+               <buildCommand>\r
+                       <name>org.eclipse.pde.ManifestBuilder</name>\r
+                       <arguments>\r
+                       </arguments>\r
+               </buildCommand>\r
+               <buildCommand>\r
+                       <name>org.eclipse.pde.SchemaBuilder</name>\r
+                       <arguments>\r
+                       </arguments>\r
+               </buildCommand>\r
+       </buildSpec>\r
+       <natures>\r
+               <nature>org.eclipse.pde.PluginNature</nature>\r
+               <nature>org.eclipse.jdt.core.javanature</nature>\r
+       </natures>\r
+</projectDescription>\r
diff --git a/org.simantics.sysdyn/.settings/org.eclipse.jdt.core.prefs b/org.simantics.sysdyn/.settings/org.eclipse.jdt.core.prefs
new file mode 100644 (file)
index 0000000..785aae6
--- /dev/null
@@ -0,0 +1,8 @@
+#Mon Nov 16 15:37:44 EET 2009\r
+eclipse.preferences.version=1\r
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled\r
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6\r
+org.eclipse.jdt.core.compiler.compliance=1.6\r
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error\r
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error\r
+org.eclipse.jdt.core.compiler.source=1.6\r
diff --git a/org.simantics.sysdyn/META-INF/MANIFEST.MF b/org.simantics.sysdyn/META-INF/MANIFEST.MF
new file mode 100644 (file)
index 0000000..6e6d17f
--- /dev/null
@@ -0,0 +1,12 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Sysdyn
+Bundle-SymbolicName: org.simantics.sysdyn
+Bundle-Version: 1.0.0.qualifier
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Require-Bundle: org.simantics.objmap;bundle-version="0.1.0",
+ org.simantics.db;bundle-version="0.6.2"
+Export-Package: org.simantics.sysdyn,
+ org.simantics.sysdyn.modelica,
+ org.simantics.sysdyn.representation,
+ org.simantics.sysdyn.representation.visitors
diff --git a/org.simantics.sysdyn/build.properties b/org.simantics.sysdyn/build.properties
new file mode 100644 (file)
index 0000000..41eb6ad
--- /dev/null
@@ -0,0 +1,4 @@
+source.. = src/\r
+output.. = bin/\r
+bin.includes = META-INF/,\\r
+               .\r
diff --git a/org.simantics.sysdyn/src/org/simantics/sysdyn/SysdynResource.java b/org.simantics.sysdyn/src/org/simantics/sysdyn/SysdynResource.java
new file mode 100644 (file)
index 0000000..01448ff
--- /dev/null
@@ -0,0 +1,102 @@
+/*******************************************************************************\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     VTT Technical Research Centre of Finland - initial API and implementation\r
+ *******************************************************************************/\r
+package org.simantics.sysdyn;\r
+\r
+\r
+import org.simantics.db.Resource;\r
+import org.simantics.db.ReadGraph;\r
+import org.simantics.db.Session;\r
+import org.simantics.db.exception.DatabaseException;\r
+\r
+public class SysdynResource {\r
+    \r
+    public final Resource Auxiliary;\r
+    public final Resource Cloud;\r
+    public final Resource Configuration;\r
+    public final Resource Dependency;\r
+    public final Resource Flow;\r
+    public final Resource HasAngle;\r
+    public final Resource HasHead;\r
+    public final Resource HasTail;\r
+    public final Resource HasValue;\r
+    public final Resource HasX;\r
+    public final Resource HasY;\r
+    public final Resource IndependentVariable;\r
+    public final Resource IsHeadOf;\r
+    public final Resource IsTailOf;\r
+    public final Resource Stock;\r
+    public final Resource SysdynProject;\r
+    public final Resource Valve;\r
+    public final Resource Variable;\r
+    \r
+    public static class URIs {\r
+        public static final String Auxiliary = "http://www.simantics.org/Sysdyn#Auxiliary";\r
+        public static final String Cloud = "http://www.simantics.org/Sysdyn#Cloud";\r
+        public static final String Configuration = "http://www.simantics.org/Sysdyn#Configuration";\r
+        public static final String Dependency = "http://www.simantics.org/Sysdyn#Dependency";\r
+        public static final String Flow = "http://www.simantics.org/Sysdyn#Flow";\r
+        public static final String HasAngle = "http://www.simantics.org/Sysdyn#HasAngle";\r
+        public static final String HasHead = "http://www.simantics.org/Sysdyn#HasHead";\r
+        public static final String HasTail = "http://www.simantics.org/Sysdyn#HasTail";\r
+        public static final String HasValue = "http://www.simantics.org/Sysdyn#HasValue";\r
+        public static final String HasX = "http://www.simantics.org/Sysdyn#HasX";\r
+        public static final String HasY = "http://www.simantics.org/Sysdyn#HasY";\r
+        public static final String IndependentVariable = "http://www.simantics.org/Sysdyn#IndependentVariable";\r
+        public static final String IsHeadOf = "http://www.simantics.org/Sysdyn#IsHeadOf";\r
+        public static final String IsTailOf = "http://www.simantics.org/Sysdyn#IsTailOf";\r
+        public static final String Stock = "http://www.simantics.org/Sysdyn#Stock";\r
+        public static final String SysdynProject = "http://www.simantics.org/Sysdyn#SysdynProject";\r
+        public static final String Valve = "http://www.simantics.org/Sysdyn#Valve";\r
+        public static final String Variable = "http://www.simantics.org/Sysdyn#Variable";\r
+    }\r
+    \r
+    public static Resource getResourceOrNull(ReadGraph graph, String uri) {\r
+        try {\r
+            return graph.getResourceByURI(uri);\r
+        } catch(DatabaseException e) {\r
+            System.err.println(e.getMessage());\r
+            return null;\r
+        }\r
+    }\r
+    \r
+    public SysdynResource(ReadGraph graph) {\r
+        Auxiliary = getResourceOrNull(graph, URIs.Auxiliary);\r
+        Cloud = getResourceOrNull(graph, URIs.Cloud);\r
+        Configuration = getResourceOrNull(graph, URIs.Configuration);\r
+        Dependency = getResourceOrNull(graph, URIs.Dependency);\r
+        Flow = getResourceOrNull(graph, URIs.Flow);\r
+        HasAngle = getResourceOrNull(graph, URIs.HasAngle);\r
+        HasHead = getResourceOrNull(graph, URIs.HasHead);\r
+        HasTail = getResourceOrNull(graph, URIs.HasTail);\r
+        HasValue = getResourceOrNull(graph, URIs.HasValue);\r
+        HasX = getResourceOrNull(graph, URIs.HasX);\r
+        HasY = getResourceOrNull(graph, URIs.HasY);\r
+        IndependentVariable = getResourceOrNull(graph, URIs.IndependentVariable);\r
+        IsHeadOf = getResourceOrNull(graph, URIs.IsHeadOf);\r
+        IsTailOf = getResourceOrNull(graph, URIs.IsTailOf);\r
+        Stock = getResourceOrNull(graph, URIs.Stock);\r
+        SysdynProject = getResourceOrNull(graph, URIs.SysdynProject);\r
+        Valve = getResourceOrNull(graph, URIs.Valve);\r
+        Variable = getResourceOrNull(graph, URIs.Variable);\r
+    }\r
+    \r
+    public static SysdynResource getInstance(ReadGraph graph) {\r
+        Session session = graph.getSession();\r
+        SysdynResource ret = session.getService(SysdynResource.class);\r
+        if(ret == null) {\r
+            ret = new SysdynResource(graph);\r
+            session.registerService(SysdynResource.class, ret);\r
+        }\r
+        return ret;\r
+    }\r
+    \r
+}\r
+\r
diff --git a/org.simantics.sysdyn/src/org/simantics/sysdyn/modelica/ModelicaWriter.java b/org.simantics.sysdyn/src/org/simantics/sysdyn/modelica/ModelicaWriter.java
new file mode 100644 (file)
index 0000000..a63897e
--- /dev/null
@@ -0,0 +1,53 @@
+package org.simantics.sysdyn.modelica;\r
+\r
+import org.simantics.sysdyn.representation.Auxiliary;\r
+import org.simantics.sysdyn.representation.Configuration;\r
+import org.simantics.sysdyn.representation.IElement;\r
+import org.simantics.sysdyn.representation.Stock;\r
+import org.simantics.sysdyn.representation.Valve;\r
+import org.simantics.sysdyn.representation.visitors.ElementVisitorVoidAdapter;\r
+import org.simantics.sysdyn.representation.visitors.IElementVisitorVoid;\r
+\r
+public class ModelicaWriter {\r
+\r
+    StringBuilder b;\r
+    \r
+    IElementVisitorVoid componentWriter = new ElementVisitorVoidAdapter() {\r
+        public void visit(Auxiliary auxiliary) {\r
+            b.append("    Real ").append(escape(auxiliary.name)).append(";\n");\r
+        }\r
+        public void visit(Stock stock) {\r
+            b.append("    Real ").append(escape(stock.name)).append(";\n");\r
+        }        \r
+        public void visit(Valve valve) {\r
+            // TODO\r
+        }\r
+    };\r
+    \r
+    IElementVisitorVoid equationWriter = new ElementVisitorVoidAdapter() {\r
+        public void visit(Auxiliary auxiliary) {\r
+            b.append("    ").append(escape(auxiliary.name))\r
+                .append(" = ").append(auxiliary.value).append(";\n");\r
+        }\r
+        public void visit(Stock stock) {\r
+        }        \r
+        public void visit(Valve valve) {\r
+        }\r
+    };\r
+    \r
+    public void write(Configuration conf) {\r
+        conf.update();\r
+        b.append("model ").append(conf.name).append('\n');\r
+        for(IElement element : conf.elements)\r
+            element.accept(componentWriter);\r
+        b.append("equation\n");\r
+        for(IElement element : conf.elements)\r
+            element.accept(equationWriter);\r
+        b.append("end ").append(conf.name).append(";\n");\r
+    }\r
+    \r
+    public String escape(String name) {\r
+        return name;\r
+    }\r
+    \r
+}\r
diff --git a/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/Auxiliary.java b/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/Auxiliary.java
new file mode 100644 (file)
index 0000000..97cb446
--- /dev/null
@@ -0,0 +1,15 @@
+package org.simantics.sysdyn.representation;\r
+\r
+import org.simantics.objmap.annotations.GraphType;\r
+import org.simantics.sysdyn.representation.visitors.IElementVisitorVoid;\r
+\r
+@GraphType("http://www.simantics.org/Sysdyn#Auxiliary")\r
+public class Auxiliary extends Variable {\r
+    // TODO\r
+    public String value;\r
+\r
+    @Override\r
+    public void accept(IElementVisitorVoid v) {\r
+        v.visit(this);        \r
+    }\r
+}\r
diff --git a/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/Cloud.java b/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/Cloud.java
new file mode 100644 (file)
index 0000000..9c1b74f
--- /dev/null
@@ -0,0 +1,12 @@
+package org.simantics.sysdyn.representation;\r
+\r
+import org.simantics.objmap.annotations.GraphType;\r
+import org.simantics.sysdyn.representation.visitors.IElementVisitorVoid;\r
+\r
+@GraphType("http://www.simantics.org/Sysdyn#Cloud")\r
+public class Cloud implements IElement {\r
+    @Override\r
+    public void accept(IElementVisitorVoid v) {\r
+        v.visit(this);        \r
+    }\r
+}\r
diff --git a/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/Configuration.java b/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/Configuration.java
new file mode 100644 (file)
index 0000000..86c640c
--- /dev/null
@@ -0,0 +1,43 @@
+package org.simantics.sysdyn.representation;\r
+\r
+import java.util.ArrayList;\r
+\r
+import org.simantics.objmap.annotations.GraphType;\r
+import org.simantics.objmap.annotations.RelatedValue;\r
+import org.simantics.sysdyn.representation.visitors.ElementVisitorVoidAdapter;\r
+import org.simantics.sysdyn.representation.visitors.IElementVisitorVoid;\r
+\r
+\r
+@GraphType("http://www.simantics.org/Sysdyn#Configuration")\r
+public class Configuration {\r
+    @RelatedValue("http://www.vtt.fi/Simantics/Layer0/1.0/Relations#HasName")\r
+    public String name = "Unnamed";\r
+    \r
+    @RelatedValue("http://www.vtt.fi/Simantics/Layer0/1.0/Relations#ConsistsOf")\r
+    public ArrayList<IElement> elements = new ArrayList<IElement>();\r
+    \r
+    IElementVisitorVoid clearVisitor = new ElementVisitorVoidAdapter() {\r
+        public void visit(Stock stock) {\r
+            stock.incomingFlows.clear();\r
+            stock.outgoingFlows.clear();\r
+        }\r
+    };\r
+    \r
+    IElementVisitorVoid updateVisitor = new ElementVisitorVoidAdapter() {\r
+        public void visit(Flow flow) {\r
+            if(flow.head instanceof Stock) {\r
+                ((Stock)flow.head).incomingFlows.add((Variable)flow.tail);\r
+            }\r
+            else if(flow.tail instanceof Stock) {\r
+                ((Stock)flow.tail).outgoingFlows.add((Variable)flow.head);\r
+            }\r
+        }\r
+    };\r
+    \r
+    public void update() {\r
+        for(IElement element : elements)\r
+            element.accept(clearVisitor);\r
+        for(IElement element : elements)\r
+            element.accept(updateVisitor);\r
+    }\r
+}\r
diff --git a/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/Dependency.java b/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/Dependency.java
new file mode 100644 (file)
index 0000000..631d222
--- /dev/null
@@ -0,0 +1,18 @@
+package org.simantics.sysdyn.representation;\r
+\r
+import org.simantics.objmap.annotations.GraphType;\r
+import org.simantics.objmap.annotations.RelatedElement;\r
+import org.simantics.sysdyn.representation.visitors.IElementVisitorVoid;\r
+\r
+@GraphType("http://www.simantics.org/Sysdyn#Cloud")\r
+public class Dependency implements IElement {\r
+    @RelatedElement("http://www.simantics.org/Sysdyn#HasTail")\r
+    public IElement tail;\r
+    @RelatedElement("http://www.simantics.org/Sysdyn#HasHead")\r
+    public IElement head;\r
+    \r
+    @Override\r
+    public void accept(IElementVisitorVoid v) {\r
+        v.visit(this);        \r
+    }\r
+}\r
diff --git a/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/Flow.java b/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/Flow.java
new file mode 100644 (file)
index 0000000..6148dbf
--- /dev/null
@@ -0,0 +1,18 @@
+package org.simantics.sysdyn.representation;\r
+\r
+import org.simantics.objmap.annotations.GraphType;\r
+import org.simantics.objmap.annotations.RelatedElement;\r
+import org.simantics.sysdyn.representation.visitors.IElementVisitorVoid;\r
+\r
+@GraphType("http://www.simantics.org/Sysdyn#Cloud")\r
+public class Flow implements IElement {\r
+    @RelatedElement("http://www.simantics.org/Sysdyn#HasTail")\r
+    public IElement tail;\r
+    @RelatedElement("http://www.simantics.org/Sysdyn#HasHead")\r
+    public IElement head;\r
+    \r
+    @Override\r
+    public void accept(IElementVisitorVoid v) {\r
+        v.visit(this);        \r
+    }\r
+}\r
diff --git a/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/IElement.java b/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/IElement.java
new file mode 100644 (file)
index 0000000..4cbaa5d
--- /dev/null
@@ -0,0 +1,7 @@
+package org.simantics.sysdyn.representation;\r
+\r
+import org.simantics.sysdyn.representation.visitors.IElementVisitorVoid;\r
+\r
+public interface IElement {\r
+    void accept(IElementVisitorVoid v);\r
+}\r
diff --git a/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/Stock.java b/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/Stock.java
new file mode 100644 (file)
index 0000000..3287853
--- /dev/null
@@ -0,0 +1,23 @@
+package org.simantics.sysdyn.representation;\r
+\r
+import java.util.ArrayList;\r
+\r
+import org.simantics.objmap.annotations.GraphType;\r
+import org.simantics.sysdyn.representation.visitors.IElementVisitorVoid;\r
+\r
+@GraphType("http://www.simantics.org/Sysdyn#Stock")\r
+public class Stock extends Variable {\r
+    public ArrayList<Variable> incomingFlows = new ArrayList<Variable>(2);\r
+    public ArrayList<Variable> outgoingFlows = new ArrayList<Variable>(2);\r
+    \r
+    public Stock() {\r
+        name = "Valve" + hashCode(); // FIXME\r
+    }\r
+    \r
+    @Override\r
+    public void accept(IElementVisitorVoid v) {\r
+        v.visit(this);        \r
+    }\r
+}\r
+\r
+\r
diff --git a/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/Valve.java b/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/Valve.java
new file mode 100644 (file)
index 0000000..ba45a7c
--- /dev/null
@@ -0,0 +1,12 @@
+package org.simantics.sysdyn.representation;\r
+\r
+import org.simantics.objmap.annotations.GraphType;\r
+import org.simantics.sysdyn.representation.visitors.IElementVisitorVoid;\r
+\r
+@GraphType("http://www.simantics.org/Sysdyn#Valve")\r
+public class Valve implements IElement {\r
+    @Override\r
+    public void accept(IElementVisitorVoid v) {\r
+        v.visit(this);        \r
+    }\r
+}\r
diff --git a/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/Variable.java b/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/Variable.java
new file mode 100644 (file)
index 0000000..379edf5
--- /dev/null
@@ -0,0 +1,8 @@
+package org.simantics.sysdyn.representation;\r
+\r
+import org.simantics.objmap.annotations.RelatedValue;\r
+\r
+public abstract class Variable implements IElement {\r
+    @RelatedValue("http://www.vtt.fi/Simantics/Layer0/1.0/Relations#HasName")\r
+    public String name;\r
+}\r
diff --git a/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/visitors/ElementVisitorVoidAdapter.java b/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/visitors/ElementVisitorVoidAdapter.java
new file mode 100644 (file)
index 0000000..d359afc
--- /dev/null
@@ -0,0 +1,36 @@
+package org.simantics.sysdyn.representation.visitors;\r
+\r
+import org.simantics.sysdyn.representation.Auxiliary;\r
+import org.simantics.sysdyn.representation.Cloud;\r
+import org.simantics.sysdyn.representation.Dependency;\r
+import org.simantics.sysdyn.representation.Flow;\r
+import org.simantics.sysdyn.representation.Stock;\r
+import org.simantics.sysdyn.representation.Valve;\r
+\r
+public class ElementVisitorVoidAdapter implements IElementVisitorVoid {\r
+\r
+    @Override\r
+    public void visit(Auxiliary auxiliary) {\r
+    }\r
+\r
+    @Override\r
+    public void visit(Stock stock) {\r
+    }\r
+\r
+    @Override\r
+    public void visit(Valve valve) {\r
+    }\r
+\r
+    @Override\r
+    public void visit(Cloud cloud) {\r
+    }\r
+\r
+    @Override\r
+    public void visit(Dependency dependency) {\r
+    }\r
+\r
+    @Override\r
+    public void visit(Flow flow) {\r
+    }\r
+\r
+}\r
diff --git a/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/visitors/IElementVisitorVoid.java b/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/visitors/IElementVisitorVoid.java
new file mode 100644 (file)
index 0000000..ce69942
--- /dev/null
@@ -0,0 +1,19 @@
+package org.simantics.sysdyn.representation.visitors;\r
+\r
+import org.simantics.sysdyn.representation.Auxiliary;\r
+import org.simantics.sysdyn.representation.Cloud;\r
+import org.simantics.sysdyn.representation.Dependency;\r
+import org.simantics.sysdyn.representation.Flow;\r
+import org.simantics.sysdyn.representation.Stock;\r
+import org.simantics.sysdyn.representation.Valve;\r
+\r
+public interface IElementVisitorVoid {\r
+\r
+    void visit(Auxiliary auxiliary);\r
+    void visit(Stock stock);\r
+    void visit(Valve valve);\r
+    void visit(Cloud cloud);\r
+    void visit(Dependency dependency);\r
+    void visit(Flow flow);   \r
+    \r
+}\r