public void Set(IDLElementTest other) { charTest = other.charTest; wcharTest = other.wcharTest; octetTest = other.octetTest; shortTest = other.shortTest; ushortTest = other.ushortTest; longTest = other.longTest; ulongTest = other.ulongTest; longlongTest = other.longlongTest; ulonglongTest = other.ulonglongTest; floatTest = other.floatTest; doubleTest = other.doubleTest; booleanTest = other.booleanTest; colorTest = other.colorTest; nested.NestedElementPubSubType.Copy(other.nestedElementTest, nestedElementTest); stringTest = other.stringTest; for (int i1 = 0; i1 < 10; ++i1) { longArray[i1] = other.longArray[i1]; } for (int i3 = 0; i3 < 5; ++i3) { for (int i4 = 0; i4 < 3; ++i4) { nested.NestedElementPubSubType.Copy(other.nestedArray[i3, i4], nestedArray[i3, i4]); } } for (int i6 = 0; i6 < 4; ++i6) { stringArray[i6] = other.stringArray[i6]; } for (int i8 = 0; i8 < 6; ++i8) { enumArray[i8] = other.enumArray[i8]; } if (other.charSeqTest == null) { charSeqTest = null; } else { charSeqTest = new System.Collections.Generic.List <char>(other.charSeqTest.Count); for (int i10 = 0; i10 < other.charSeqTest.Count; i10++) { charSeqTest.Add(other.charSeqTest[i10]); } } if (other.wcharSeqTest == null) { wcharSeqTest = null; } else { wcharSeqTest = new System.Collections.Generic.List <char>(other.wcharSeqTest.Count); for (int i11 = 0; i11 < other.wcharSeqTest.Count; i11++) { wcharSeqTest.Add(other.wcharSeqTest[i11]); } } if (other.octetSeqTest == null) { octetSeqTest = null; } else { octetSeqTest = new System.Collections.Generic.List <byte>(other.octetSeqTest.Count); for (int i12 = 0; i12 < other.octetSeqTest.Count; i12++) { octetSeqTest.Add(other.octetSeqTest[i12]); } } if (other.shortSeqTest == null) { shortSeqTest = null; } else { shortSeqTest = new System.Collections.Generic.List <short>(other.shortSeqTest.Count); for (int i13 = 0; i13 < other.shortSeqTest.Count; i13++) { shortSeqTest.Add(other.shortSeqTest[i13]); } } if (other.ushortSeqTest == null) { ushortSeqTest = null; } else { ushortSeqTest = new System.Collections.Generic.List <ushort>(other.ushortSeqTest.Count); for (int i14 = 0; i14 < other.ushortSeqTest.Count; i14++) { ushortSeqTest.Add(other.ushortSeqTest[i14]); } } if (other.longSeqTest == null) { longSeqTest = null; } else { longSeqTest = new System.Collections.Generic.List <int>(other.longSeqTest.Count); for (int i15 = 0; i15 < other.longSeqTest.Count; i15++) { longSeqTest.Add(other.longSeqTest[i15]); } } if (other.ulongSeqTest == null) { ulongSeqTest = null; } else { ulongSeqTest = new System.Collections.Generic.List <uint>(other.ulongSeqTest.Count); for (int i16 = 0; i16 < other.ulongSeqTest.Count; i16++) { ulongSeqTest.Add(other.ulongSeqTest[i16]); } } if (other.longlongSeqtest == null) { longlongSeqtest = null; } else { longlongSeqtest = new System.Collections.Generic.List <long>(other.longlongSeqtest.Count); for (int i17 = 0; i17 < other.longlongSeqtest.Count; i17++) { longlongSeqtest.Add(other.longlongSeqtest[i17]); } } if (other.ulonglongSeqTest == null) { ulonglongSeqTest = null; } else { ulonglongSeqTest = new System.Collections.Generic.List <ulong>(other.ulonglongSeqTest.Count); for (int i18 = 0; i18 < other.ulonglongSeqTest.Count; i18++) { ulonglongSeqTest.Add(other.ulonglongSeqTest[i18]); } } if (other.floatSeqTest == null) { floatSeqTest = null; } else { floatSeqTest = new System.Collections.Generic.List <float>(other.floatSeqTest.Count); for (int i19 = 0; i19 < other.floatSeqTest.Count; i19++) { floatSeqTest.Add(other.floatSeqTest[i19]); } } if (other.doubleSeqTest == null) { doubleSeqTest = null; } else { doubleSeqTest = new System.Collections.Generic.List <double>(other.doubleSeqTest.Count); for (int i20 = 0; i20 < other.doubleSeqTest.Count; i20++) { doubleSeqTest.Add(other.doubleSeqTest[i20]); } } if (other.booleanSeqTest == null) { booleanSeqTest = null; } else { booleanSeqTest = new System.Collections.Generic.List <bool>(other.booleanSeqTest.Count); for (int i21 = 0; i21 < other.booleanSeqTest.Count; i21++) { booleanSeqTest.Add(other.booleanSeqTest[i21]); } } if (other.nestedSeqTest == null) { nestedSeqTest = null; } else { nestedSeqTest = new System.Collections.Generic.List <nested.NestedElement>(other.nestedSeqTest.Count); for (int i22 = 0; i22 < other.nestedSeqTest.Count; i22++) { if (other.nestedSeqTest[i22] == null) { nestedSeqTest.Add(null); } else { nested.NestedElement newElement = nested.NestedElementPubSubType.Create(); nested.NestedElementPubSubType.Copy(other.nestedSeqTest[i22], newElement); nestedSeqTest.Add(newElement); } } } if (other.enumSeqTest == null) { enumSeqTest = null; } else { enumSeqTest = new System.Collections.Generic.List <test.Color>(other.enumSeqTest.Count); for (int i23 = 0; i23 < other.enumSeqTest.Count; i23++) { enumSeqTest.Add(other.enumSeqTest[i23]); } } if (other.stringSeqTest == null) { stringSeqTest = null; } else { stringSeqTest = new System.Collections.Generic.List <string>(other.stringSeqTest.Count); for (int i24 = 0; i24 < other.stringSeqTest.Count; i24++) { stringSeqTest.Add(other.stringSeqTest[i24]); } } }
public static void read(test.IDLElementTest data, Halodi.CDR.CDRDeserializer cdr) { data.charTest = cdr.read_type_8(); data.wcharTest = cdr.read_type_14(); data.octetTest = cdr.read_type_9(); data.shortTest = cdr.read_type_1(); data.ushortTest = cdr.read_type_3(); data.longTest = cdr.read_type_2(); data.ulongTest = cdr.read_type_4(); data.longlongTest = cdr.read_type_11(); data.ulonglongTest = cdr.read_type_12(); data.floatTest = cdr.read_type_5(); data.doubleTest = cdr.read_type_6(); data.booleanTest = cdr.read_type_7(); data.colorTest = (test.Color)cdr.read_type_c(); data.nestedElementTest = nested.NestedElementPubSubType.Create(); nested.NestedElementPubSubType.read(data.nestedElementTest, cdr); data.stringTest = cdr.read_type_d(); for (int i0 = 0; i0 < 10; ++i0) { data.longArray[i0] = cdr.read_type_2(); } for (int i0 = 0; i0 < 5; ++i0) { for (int i1 = 0; i1 < 3; ++i1) { nested.NestedElementPubSubType.read(data.nestedArray[i0, i1], cdr); } } for (int i0 = 0; i0 < 4; ++i0) { data.stringArray[i0] = cdr.read_type_d(); } for (int i0 = 0; i0 < 6; ++i0) { int ordinal = cdr.read_type_c(); if (ordinal < 0) { ordinal = 0; } data.enumArray[i0] = (test.Color)ordinal; } int charSeqTest_length = cdr.read_type_2(); data.charSeqTest = new System.Collections.Generic.List <char>(charSeqTest_length); for (int i = 0; i < charSeqTest_length; i++) { data.charSeqTest.Add(cdr.read_type_8()); } int wcharSeqTest_length = cdr.read_type_2(); data.wcharSeqTest = new System.Collections.Generic.List <char>(wcharSeqTest_length); for (int i = 0; i < wcharSeqTest_length; i++) { data.wcharSeqTest.Add(cdr.read_type_14()); } int octetSeqTest_length = cdr.read_type_2(); data.octetSeqTest = new System.Collections.Generic.List <byte>(octetSeqTest_length); for (int i = 0; i < octetSeqTest_length; i++) { data.octetSeqTest.Add(cdr.read_type_9()); } int shortSeqTest_length = cdr.read_type_2(); data.shortSeqTest = new System.Collections.Generic.List <short>(shortSeqTest_length); for (int i = 0; i < shortSeqTest_length; i++) { data.shortSeqTest.Add(cdr.read_type_1()); } int ushortSeqTest_length = cdr.read_type_2(); data.ushortSeqTest = new System.Collections.Generic.List <ushort>(ushortSeqTest_length); for (int i = 0; i < ushortSeqTest_length; i++) { data.ushortSeqTest.Add(cdr.read_type_3()); } int longSeqTest_length = cdr.read_type_2(); data.longSeqTest = new System.Collections.Generic.List <int>(longSeqTest_length); for (int i = 0; i < longSeqTest_length; i++) { data.longSeqTest.Add(cdr.read_type_2()); } int ulongSeqTest_length = cdr.read_type_2(); data.ulongSeqTest = new System.Collections.Generic.List <uint>(ulongSeqTest_length); for (int i = 0; i < ulongSeqTest_length; i++) { data.ulongSeqTest.Add(cdr.read_type_4()); } int longlongSeqtest_length = cdr.read_type_2(); data.longlongSeqtest = new System.Collections.Generic.List <long>(longlongSeqtest_length); for (int i = 0; i < longlongSeqtest_length; i++) { data.longlongSeqtest.Add(cdr.read_type_11()); } int ulonglongSeqTest_length = cdr.read_type_2(); data.ulonglongSeqTest = new System.Collections.Generic.List <ulong>(ulonglongSeqTest_length); for (int i = 0; i < ulonglongSeqTest_length; i++) { data.ulonglongSeqTest.Add(cdr.read_type_12()); } int floatSeqTest_length = cdr.read_type_2(); data.floatSeqTest = new System.Collections.Generic.List <float>(floatSeqTest_length); for (int i = 0; i < floatSeqTest_length; i++) { data.floatSeqTest.Add(cdr.read_type_5()); } int doubleSeqTest_length = cdr.read_type_2(); data.doubleSeqTest = new System.Collections.Generic.List <double>(doubleSeqTest_length); for (int i = 0; i < doubleSeqTest_length; i++) { data.doubleSeqTest.Add(cdr.read_type_6()); } int booleanSeqTest_length = cdr.read_type_2(); data.booleanSeqTest = new System.Collections.Generic.List <bool>(booleanSeqTest_length); for (int i = 0; i < booleanSeqTest_length; i++) { data.booleanSeqTest.Add(cdr.read_type_7()); } int nestedSeqTest_length = cdr.read_type_2(); data.nestedSeqTest = new System.Collections.Generic.List <nested.NestedElement>(nestedSeqTest_length); for (int i = 0; i < nestedSeqTest_length; i++) { nested.NestedElement new_nestedSeqTest = nested.NestedElementPubSubType.Create(); nested.NestedElementPubSubType.read(new_nestedSeqTest, cdr); data.nestedSeqTest.Add(new_nestedSeqTest); } int enumSeqTest_length = cdr.read_type_2(); data.enumSeqTest = new System.Collections.Generic.List <test.Color>(enumSeqTest_length); for (int i = 0; i < enumSeqTest_length; i++) { int ordinal = cdr.read_type_c(); if (ordinal < 0) { ordinal = 0; } data.enumSeqTest.Add((test.Color)ordinal); } int stringSeqTest_length = cdr.read_type_2(); data.stringSeqTest = new System.Collections.Generic.List <string>(stringSeqTest_length); for (int i = 0; i < stringSeqTest_length; i++) { data.stringSeqTest.Add(cdr.read_type_d()); } }