aboutsummaryrefslogtreecommitdiff
path: root/src/transient-0/java/org/shedlang/compiler/patio/values
diff options
context:
space:
mode:
Diffstat (limited to 'src/transient-0/java/org/shedlang/compiler/patio/values')
-rw-r--r--src/transient-0/java/org/shedlang/compiler/patio/values/transient0/HobgoblinTransient0Values.java132
1 files changed, 132 insertions, 0 deletions
diff --git a/src/transient-0/java/org/shedlang/compiler/patio/values/transient0/HobgoblinTransient0Values.java b/src/transient-0/java/org/shedlang/compiler/patio/values/transient0/HobgoblinTransient0Values.java
new file mode 100644
index 00000000..05523dc2
--- /dev/null
+++ b/src/transient-0/java/org/shedlang/compiler/patio/values/transient0/HobgoblinTransient0Values.java
@@ -0,0 +1,132 @@
+// Generated by hobgoblin.
+
+package org.shedlang.compiler.patio.values.transient0;
+
+// Custom area start: org.shedlang.compiler.patio.values.transient0.HobgoblinTransient0Values imports
+// Custom area end: org.shedlang.compiler.patio.values.transient0.HobgoblinTransient0Values imports
+
+public final class HobgoblinTransient0Values {
+ public static void encodePatioDataPtrValue(org.shedlang.compiler.patio.values.PatioDataPtrValue value, java.io.OutputStream outputStream, java.util.Map<org.shedlang.compiler.transient0.HobgoblinTransient0TaggedSharedValue, java.lang.Long> sharedValues) throws java.io.IOException {
+ switch (value) {
+ case org.shedlang.compiler.patio.values.PatioDataPtrValueDataElement value$0 -> {
+ org.shedlang.compiler.transient0.HobgoblinTransient0Builtins.encodeInt32(0, outputStream, sharedValues);
+ org.shedlang.compiler.patio.values.transient0.HobgoblinTransient0Values.encodePatioDataPtrValueDataElement(value$0, outputStream, sharedValues);
+ }
+ case org.shedlang.compiler.patio.values.PatioDataPtrValueNull value$1 -> {
+ org.shedlang.compiler.transient0.HobgoblinTransient0Builtins.encodeInt32(1, outputStream, sharedValues);
+ org.shedlang.compiler.patio.values.transient0.HobgoblinTransient0Values.encodePatioDataPtrValueNull(value$1, outputStream, sharedValues);
+ }
+ }
+ }
+
+ public static org.shedlang.compiler.patio.values.PatioDataPtrValue decodePatioDataPtrValue(java.io.InputStream inputStream, java.util.List<java.lang.Object> sharedValues) throws java.io.IOException {
+ var variantTag = org.shedlang.compiler.transient0.HobgoblinTransient0Builtins.decodeInt32(inputStream, sharedValues);
+ switch (variantTag) {
+ case 0 -> {
+ var value$0 = org.shedlang.compiler.patio.values.transient0.HobgoblinTransient0Values.decodePatioDataPtrValueDataElement(inputStream, sharedValues);
+ return value$0;
+ }
+ case 1 -> {
+ var value$1 = org.shedlang.compiler.patio.values.transient0.HobgoblinTransient0Values.decodePatioDataPtrValueNull(inputStream, sharedValues);
+ return value$1;
+ }
+ default -> {
+ throw new java.lang.RuntimeException("unexpected patio/values.PatioDataPtrValue variant tag: " + variantTag);
+ }
+ }
+ }
+
+ public static void encodePatioDataPtrValueDataElement(org.shedlang.compiler.patio.values.PatioDataPtrValueDataElement value, java.io.OutputStream outputStream, java.util.Map<org.shedlang.compiler.transient0.HobgoblinTransient0TaggedSharedValue, java.lang.Long> sharedValues) throws java.io.IOException {
+ org.shedlang.compiler.transient0.HobgoblinTransient0Builtins.encodeString(value.name(), outputStream, sharedValues);
+ }
+
+ public static org.shedlang.compiler.patio.values.PatioDataPtrValueDataElement decodePatioDataPtrValueDataElement(java.io.InputStream inputStream, java.util.List<java.lang.Object> sharedValues) throws java.io.IOException {
+ var name = org.shedlang.compiler.transient0.HobgoblinTransient0Builtins.decodeString(inputStream, sharedValues);
+ return new org.shedlang.compiler.patio.values.PatioDataPtrValueDataElement(name);
+ }
+
+ public static void encodePatioDataPtrValueNull(org.shedlang.compiler.patio.values.PatioDataPtrValueNull value, java.io.OutputStream outputStream, java.util.Map<org.shedlang.compiler.transient0.HobgoblinTransient0TaggedSharedValue, java.lang.Long> sharedValues) throws java.io.IOException {
+ }
+
+ public static org.shedlang.compiler.patio.values.PatioDataPtrValueNull decodePatioDataPtrValueNull(java.io.InputStream inputStream, java.util.List<java.lang.Object> sharedValues) throws java.io.IOException {
+ return new org.shedlang.compiler.patio.values.PatioDataPtrValueNull();
+ }
+
+ public static void encodePatioIntValue(org.shedlang.compiler.patio.values.PatioIntValue value, java.io.OutputStream outputStream, java.util.Map<org.shedlang.compiler.transient0.HobgoblinTransient0TaggedSharedValue, java.lang.Long> sharedValues) throws java.io.IOException {
+ switch (value) {
+ case org.shedlang.compiler.patio.values.PatioIntValueByteOffsetOf value$0 -> {
+ org.shedlang.compiler.transient0.HobgoblinTransient0Builtins.encodeInt32(0, outputStream, sharedValues);
+ org.shedlang.compiler.patio.values.transient0.HobgoblinTransient0Values.encodePatioIntValueByteOffsetOf(value$0, outputStream, sharedValues);
+ }
+ case org.shedlang.compiler.patio.values.PatioIntValueByteSizeOf value$1 -> {
+ org.shedlang.compiler.transient0.HobgoblinTransient0Builtins.encodeInt32(1, outputStream, sharedValues);
+ org.shedlang.compiler.patio.values.transient0.HobgoblinTransient0Values.encodePatioIntValueByteSizeOf(value$1, outputStream, sharedValues);
+ }
+ case org.shedlang.compiler.patio.values.PatioIntValueLiteral value$2 -> {
+ org.shedlang.compiler.transient0.HobgoblinTransient0Builtins.encodeInt32(2, outputStream, sharedValues);
+ org.shedlang.compiler.patio.values.transient0.HobgoblinTransient0Values.encodePatioIntValueLiteral(value$2, outputStream, sharedValues);
+ }
+ }
+ }
+
+ public static org.shedlang.compiler.patio.values.PatioIntValue decodePatioIntValue(java.io.InputStream inputStream, java.util.List<java.lang.Object> sharedValues) throws java.io.IOException {
+ var variantTag = org.shedlang.compiler.transient0.HobgoblinTransient0Builtins.decodeInt32(inputStream, sharedValues);
+ switch (variantTag) {
+ case 0 -> {
+ var value$0 = org.shedlang.compiler.patio.values.transient0.HobgoblinTransient0Values.decodePatioIntValueByteOffsetOf(inputStream, sharedValues);
+ return value$0;
+ }
+ case 1 -> {
+ var value$1 = org.shedlang.compiler.patio.values.transient0.HobgoblinTransient0Values.decodePatioIntValueByteSizeOf(inputStream, sharedValues);
+ return value$1;
+ }
+ case 2 -> {
+ var value$2 = org.shedlang.compiler.patio.values.transient0.HobgoblinTransient0Values.decodePatioIntValueLiteral(inputStream, sharedValues);
+ return value$2;
+ }
+ default -> {
+ throw new java.lang.RuntimeException("unexpected patio/values.PatioIntValue variant tag: " + variantTag);
+ }
+ }
+ }
+
+ public static void encodePatioIntValueByteOffsetOf(org.shedlang.compiler.patio.values.PatioIntValueByteOffsetOf value, java.io.OutputStream outputStream, java.util.Map<org.shedlang.compiler.transient0.HobgoblinTransient0TaggedSharedValue, java.lang.Long> sharedValues) throws java.io.IOException {
+ org.shedlang.compiler.patio.types.transient0.HobgoblinTransient0Types.encodePatioDataLayout(value.layout(), outputStream, sharedValues);
+ org.shedlang.compiler.transient0.HobgoblinTransient0Builtins.encodeInt64((long) value.elementOffsets().size(), outputStream, sharedValues);
+ for (var element : value.elementOffsets()) {
+ org.shedlang.compiler.transient0.HobgoblinTransient0Builtins.encodeInt32(element, outputStream, sharedValues);
+ }
+ }
+
+ public static org.shedlang.compiler.patio.values.PatioIntValueByteOffsetOf decodePatioIntValueByteOffsetOf(java.io.InputStream inputStream, java.util.List<java.lang.Object> sharedValues) throws java.io.IOException {
+ var layout = org.shedlang.compiler.patio.types.transient0.HobgoblinTransient0Types.decodePatioDataLayout(inputStream, sharedValues);
+ var elementOffsets$size = org.shedlang.compiler.transient0.HobgoblinTransient0Builtins.decodeInt64(inputStream, sharedValues);
+ var elementOffsets = new java.util.ArrayList<java.lang.Integer>((int) elementOffsets$size);
+ for (long elementOffsets$index = 0; elementOffsets$index < elementOffsets$size; elementOffsets$index++) {
+ var elementOffsets$element = org.shedlang.compiler.transient0.HobgoblinTransient0Builtins.decodeInt32(inputStream, sharedValues);
+ elementOffsets.add(elementOffsets$element);
+ }
+ return new org.shedlang.compiler.patio.values.PatioIntValueByteOffsetOf(layout, elementOffsets);
+ }
+
+ public static void encodePatioIntValueByteSizeOf(org.shedlang.compiler.patio.values.PatioIntValueByteSizeOf value, java.io.OutputStream outputStream, java.util.Map<org.shedlang.compiler.transient0.HobgoblinTransient0TaggedSharedValue, java.lang.Long> sharedValues) throws java.io.IOException {
+ org.shedlang.compiler.patio.types.transient0.HobgoblinTransient0Types.encodePatioDataLayout(value.layout(), outputStream, sharedValues);
+ }
+
+ public static org.shedlang.compiler.patio.values.PatioIntValueByteSizeOf decodePatioIntValueByteSizeOf(java.io.InputStream inputStream, java.util.List<java.lang.Object> sharedValues) throws java.io.IOException {
+ var layout = org.shedlang.compiler.patio.types.transient0.HobgoblinTransient0Types.decodePatioDataLayout(inputStream, sharedValues);
+ return new org.shedlang.compiler.patio.values.PatioIntValueByteSizeOf(layout);
+ }
+
+ public static void encodePatioIntValueLiteral(org.shedlang.compiler.patio.values.PatioIntValueLiteral value, java.io.OutputStream outputStream, java.util.Map<org.shedlang.compiler.transient0.HobgoblinTransient0TaggedSharedValue, java.lang.Long> sharedValues) throws java.io.IOException {
+ org.shedlang.compiler.transient0.HobgoblinTransient0Builtins.encodeInt32(value.value(), outputStream, sharedValues);
+ }
+
+ public static org.shedlang.compiler.patio.values.PatioIntValueLiteral decodePatioIntValueLiteral(java.io.InputStream inputStream, java.util.List<java.lang.Object> sharedValues) throws java.io.IOException {
+ var value = org.shedlang.compiler.transient0.HobgoblinTransient0Builtins.decodeInt32(inputStream, sharedValues);
+ return new org.shedlang.compiler.patio.values.PatioIntValueLiteral(value);
+ }
+
+ // Custom area start: org.shedlang.compiler.patio.values.transient0.HobgoblinTransient0Values body
+ // Custom area end: org.shedlang.compiler.patio.values.transient0.HobgoblinTransient0Values body
+}