X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.db.procore%2Fsrc%2Ffi%2Fvtt%2Fsimantics%2Fprocore%2Finternal%2FChange.java;h=340a9491e4478b075b4e08c4d9b262fccfa134ff;hp=fb0006c5ff090b8ce5020df60e9354863bef5f81;hb=56a799c9b7d395cefb59e101cd0f7ce8d68f88e6;hpb=969bd23cab98a79ca9101af33334000879fb60c5 diff --git a/bundles/org.simantics.db.procore/src/fi/vtt/simantics/procore/internal/Change.java b/bundles/org.simantics.db.procore/src/fi/vtt/simantics/procore/internal/Change.java index fb0006c5f..340a9491e 100644 --- a/bundles/org.simantics.db.procore/src/fi/vtt/simantics/procore/internal/Change.java +++ b/bundles/org.simantics.db.procore/src/fi/vtt/simantics/procore/internal/Change.java @@ -1,70 +1,70 @@ -package fi.vtt.simantics.procore.internal; - -import org.simantics.db.service.ClusterUID; - -final public class Change { - - byte op0; - int key0; - int key1; - int key2; - ClusterUID clusterUID1; - ClusterUID clusterUID2; - byte[] lookup1; - byte[] lookup2; - byte lookIndex1; - byte lookIndex2; - int lastArg = 0; - - @Override - public String toString() { - return "Change " + (key0&0xffff) + " " + (key1&0xffff) + " " + (key2&0xffff) + " " + clusterUID2 + " " + clusterUID2; - } - - public final void init() { - lastArg = 0; - } - - public final void initValue() { - lastArg = 0; - } - - final void addStatementIndex0(int key, byte op) { - assert (op != 0); - key0 = key; - op0 = op; - } - - final void addStatementIndex1(int key, ClusterUID clusterUID, byte lookIndex, byte[] lookup) { - key1 = key; - clusterUID1 = clusterUID; - lookIndex1 = lookIndex; - lookup1 = lookup; -// if(lookIndex > 0) -// System.err.println("statementIndex1 " + pos + " " + lookIndex); - } - - final void addStatementIndex2(int key, ClusterUID clusterUID, byte lookIndex, byte[] lookup) { - key2 = key; - clusterUID2 = clusterUID; - lookIndex2 = lookIndex; - lookup2 = lookup; - } - - final void addStatementIndex(int key, ClusterUID clusterUID, byte op) { - - // new Exception("lastArg=" + lastArg).printStackTrace(); - - assert (lastArg < 3); - - if (0 == lastArg) - addStatementIndex0(key, op); - else if (1 == lastArg) - addStatementIndex1(key, clusterUID, (byte)0, null); - else if (2 == lastArg) - addStatementIndex2(key, clusterUID, (byte)0, null); - - lastArg++; - - } -} +package fi.vtt.simantics.procore.internal; + +import org.simantics.db.service.ClusterUID; + +final public class Change { + + byte op0; + int key0; + int key1; + int key2; + ClusterUID clusterUID1; + ClusterUID clusterUID2; + byte[] lookup1; + byte[] lookup2; + byte lookIndex1; + byte lookIndex2; + int lastArg = 0; + + @Override + public String toString() { + return "Change " + (key0&0xffff) + " " + (key1&0xffff) + " " + (key2&0xffff) + " " + clusterUID2 + " " + clusterUID2; + } + + public final void init() { + lastArg = 0; + } + + public final void initValue() { + lastArg = 0; + } + + final void addStatementIndex0(int key, byte op) { + assert (op != 0); + key0 = key; + op0 = op; + } + + final void addStatementIndex1(int key, ClusterUID clusterUID, byte lookIndex, byte[] lookup) { + key1 = key; + clusterUID1 = clusterUID; + lookIndex1 = lookIndex; + lookup1 = lookup; +// if(lookIndex > 0) +// System.err.println("statementIndex1 " + pos + " " + lookIndex); + } + + final void addStatementIndex2(int key, ClusterUID clusterUID, byte lookIndex, byte[] lookup) { + key2 = key; + clusterUID2 = clusterUID; + lookIndex2 = lookIndex; + lookup2 = lookup; + } + + final void addStatementIndex(int key, ClusterUID clusterUID, byte op) { + + // new Exception("lastArg=" + lastArg).printStackTrace(); + + assert (lastArg < 3); + + if (0 == lastArg) + addStatementIndex0(key, op); + else if (1 == lastArg) + addStatementIndex1(key, clusterUID, (byte)0, null); + else if (2 == lastArg) + addStatementIndex2(key, clusterUID, (byte)0, null); + + lastArg++; + + } +}