public void Read(TProtocol iprot) { iprot.IncrementRecursionDepth(); try { TField field; iprot.ReadStructBegin(); while (true) { field = iprot.ReadFieldBegin(); if (field.Type == TType.Stop) { break; } switch (field.ID) { case 1: if (field.Type == TType.Struct) { PostureValues = new MMIStandard.MAvatarPostureValues(); PostureValues.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 2: if (field.Type == TType.List) { { Constraints = new List <MMIStandard.MConstraint>(); TList _list94 = iprot.ReadListBegin(); for (int _i95 = 0; _i95 < _list94.Count; ++_i95) { MMIStandard.MConstraint _elem96; _elem96 = new MMIStandard.MConstraint(); _elem96.Read(iprot); Constraints.Add(_elem96); } iprot.ReadListEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 3: if (field.Type == TType.Map) { { Properties = new Dictionary <string, string>(); TMap _map97 = iprot.ReadMapBegin(); for (int _i98 = 0; _i98 < _map97.Count; ++_i98) { string _key99; string _val100; _key99 = iprot.ReadString(); _val100 = iprot.ReadString(); Properties[_key99] = _val100; } iprot.ReadMapEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; default: TProtocolUtil.Skip(iprot, field.Type); break; } iprot.ReadFieldEnd(); } iprot.ReadStructEnd(); } finally { iprot.DecrementRecursionDepth(); } }
public void Read(TProtocol iprot) { iprot.IncrementRecursionDepth(); try { bool isset_ID = false; bool isset_Name = false; bool isset_Transform = false; TField field; iprot.ReadStructBegin(); while (true) { field = iprot.ReadFieldBegin(); if (field.Type == TType.Stop) { break; } switch (field.ID) { case 1: if (field.Type == TType.String) { ID = iprot.ReadString(); isset_ID = true; } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 2: if (field.Type == TType.String) { Name = iprot.ReadString(); isset_Name = true; } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 3: if (field.Type == TType.Struct) { Transform = new MMIStandard.MTransform(); Transform.Read(iprot); isset_Transform = true; } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 4: if (field.Type == TType.Struct) { Collider = new MCollider(); Collider.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 5: if (field.Type == TType.Struct) { Mesh = new MMesh(); Mesh.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 6: if (field.Type == TType.Struct) { PhysicsProperties = new MPhysicsProperties(); PhysicsProperties.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 8: if (field.Type == TType.Map) { { Properties = new Dictionary <string, string>(); TMap _map113 = iprot.ReadMapBegin(); for (int _i114 = 0; _i114 < _map113.Count; ++_i114) { string _key115; string _val116; _key115 = iprot.ReadString(); _val116 = iprot.ReadString(); Properties[_key115] = _val116; } iprot.ReadMapEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 9: if (field.Type == TType.List) { { Attachments = new List <MAttachment>(); TList _list117 = iprot.ReadListBegin(); for (int _i118 = 0; _i118 < _list117.Count; ++_i118) { MAttachment _elem119; _elem119 = new MAttachment(); _elem119.Read(iprot); Attachments.Add(_elem119); } iprot.ReadListEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 10: if (field.Type == TType.List) { { Constraints = new List <MMIStandard.MConstraint>(); TList _list120 = iprot.ReadListBegin(); for (int _i121 = 0; _i121 < _list120.Count; ++_i121) { MMIStandard.MConstraint _elem122; _elem122 = new MMIStandard.MConstraint(); _elem122.Read(iprot); Constraints.Add(_elem122); } iprot.ReadListEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; default: TProtocolUtil.Skip(iprot, field.Type); break; } iprot.ReadFieldEnd(); } iprot.ReadStructEnd(); if (!isset_ID) { throw new TProtocolException(TProtocolException.INVALID_DATA, "required field ID not set"); } if (!isset_Name) { throw new TProtocolException(TProtocolException.INVALID_DATA, "required field Name not set"); } if (!isset_Transform) { throw new TProtocolException(TProtocolException.INVALID_DATA, "required field Transform not set"); } } finally { iprot.DecrementRecursionDepth(); } }
public void Read(TProtocol iprot) { iprot.IncrementRecursionDepth(); try { bool isset_ID = false; TField field; iprot.ReadStructBegin(); while (true) { field = iprot.ReadFieldBegin(); if (field.Type == TType.Stop) { break; } switch (field.ID) { case 1: if (field.Type == TType.String) { ID = iprot.ReadString(); isset_ID = true; } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 2: if (field.Type == TType.String) { Name = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 3: if (field.Type == TType.Struct) { Transform = new MTransformUpdate(); Transform.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 4: if (field.Type == TType.Struct) { Collider = new MCollider(); Collider.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 5: if (field.Type == TType.Struct) { Mesh = new MMesh(); Mesh.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 6: if (field.Type == TType.Struct) { PhysicsProperties = new MPhysicsProperties(); PhysicsProperties.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 7: if (field.Type == TType.List) { { HandPoses = new List <MMIStandard.MHandPose>(); TList _list126 = iprot.ReadListBegin(); for (int _i127 = 0; _i127 < _list126.Count; ++_i127) { MMIStandard.MHandPose _elem128; _elem128 = new MMIStandard.MHandPose(); _elem128.Read(iprot); HandPoses.Add(_elem128); } iprot.ReadListEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 8: if (field.Type == TType.List) { { Properties = new List <MPropertyUpdate>(); TList _list129 = iprot.ReadListBegin(); for (int _i130 = 0; _i130 < _list129.Count; ++_i130) { MPropertyUpdate _elem131; _elem131 = new MPropertyUpdate(); _elem131.Read(iprot); Properties.Add(_elem131); } iprot.ReadListEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 9: if (field.Type == TType.List) { { Attachments = new List <MAttachment>(); TList _list132 = iprot.ReadListBegin(); for (int _i133 = 0; _i133 < _list132.Count; ++_i133) { MAttachment _elem134; _elem134 = new MAttachment(); _elem134.Read(iprot); Attachments.Add(_elem134); } iprot.ReadListEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 10: if (field.Type == TType.List) { { Constraints = new List <MMIStandard.MConstraint>(); TList _list135 = iprot.ReadListBegin(); for (int _i136 = 0; _i136 < _list135.Count; ++_i136) { MMIStandard.MConstraint _elem137; _elem137 = new MMIStandard.MConstraint(); _elem137.Read(iprot); Constraints.Add(_elem137); } iprot.ReadListEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; default: TProtocolUtil.Skip(iprot, field.Type); break; } iprot.ReadFieldEnd(); } iprot.ReadStructEnd(); if (!isset_ID) { throw new TProtocolException(TProtocolException.INVALID_DATA, "required field ID not set"); } } finally { iprot.DecrementRecursionDepth(); } }
public void Read(TProtocol iprot) { iprot.IncrementRecursionDepth(); try { bool isset_Posture = false; TField field; iprot.ReadStructBegin(); while (true) { field = iprot.ReadFieldBegin(); if (field.Type == TType.Stop) { break; } switch (field.ID) { case 1: if (field.Type == TType.Struct) { Posture = new MMIStandard.MAvatarPostureValues(); Posture.Read(iprot); isset_Posture = true; } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 2: if (field.Type == TType.List) { { Constraints = new List <MMIStandard.MConstraint>(); TList _list12 = iprot.ReadListBegin(); for (int _i13 = 0; _i13 < _list12.Count; ++_i13) { MMIStandard.MConstraint _elem14; _elem14 = new MMIStandard.MConstraint(); _elem14.Read(iprot); Constraints.Add(_elem14); } iprot.ReadListEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 3: if (field.Type == TType.List) { { Events = new List <MSimulationEvent>(); TList _list15 = iprot.ReadListBegin(); for (int _i16 = 0; _i16 < _list15.Count; ++_i16) { MSimulationEvent _elem17; _elem17 = new MSimulationEvent(); _elem17.Read(iprot); Events.Add(_elem17); } iprot.ReadListEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 4: if (field.Type == TType.List) { { SceneManipulations = new List <MMIStandard.MSceneManipulation>(); TList _list18 = iprot.ReadListBegin(); for (int _i19 = 0; _i19 < _list18.Count; ++_i19) { MMIStandard.MSceneManipulation _elem20; _elem20 = new MMIStandard.MSceneManipulation(); _elem20.Read(iprot); SceneManipulations.Add(_elem20); } iprot.ReadListEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 5: if (field.Type == TType.List) { { DrawingCalls = new List <MMIStandard.MDrawingCall>(); TList _list21 = iprot.ReadListBegin(); for (int _i22 = 0; _i22 < _list21.Count; ++_i22) { MMIStandard.MDrawingCall _elem23; _elem23 = new MMIStandard.MDrawingCall(); _elem23.Read(iprot); DrawingCalls.Add(_elem23); } iprot.ReadListEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 6: if (field.Type == TType.List) { { LogData = new List <string>(); TList _list24 = iprot.ReadListBegin(); for (int _i25 = 0; _i25 < _list24.Count; ++_i25) { string _elem26; _elem26 = iprot.ReadString(); LogData.Add(_elem26); } iprot.ReadListEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; default: TProtocolUtil.Skip(iprot, field.Type); break; } iprot.ReadFieldEnd(); } iprot.ReadStructEnd(); if (!isset_Posture) { throw new TProtocolException(TProtocolException.INVALID_DATA, "required field Posture not set"); } } finally { iprot.DecrementRecursionDepth(); } }
public void Read(TProtocol iprot) { iprot.IncrementRecursionDepth(); try { bool isset_ID = false; bool isset_Name = false; bool isset_MotionType = false; TField field; iprot.ReadStructBegin(); while (true) { field = iprot.ReadFieldBegin(); if (field.Type == TType.Stop) { break; } switch (field.ID) { case 1: if (field.Type == TType.String) { ID = iprot.ReadString(); isset_ID = true; } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 2: if (field.Type == TType.String) { Name = iprot.ReadString(); isset_Name = true; } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 3: if (field.Type == TType.String) { MotionType = iprot.ReadString(); isset_MotionType = true; } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 4: if (field.Type == TType.Map) { { Properties = new Dictionary <string, string>(); TMap _map66 = iprot.ReadMapBegin(); for (int _i67 = 0; _i67 < _map66.Count; ++_i67) { string _key68; string _val69; _key68 = iprot.ReadString(); _val69 = iprot.ReadString(); Properties[_key68] = _val69; } iprot.ReadMapEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 5: if (field.Type == TType.List) { { Constraints = new List <MMIStandard.MConstraint>(); TList _list70 = iprot.ReadListBegin(); for (int _i71 = 0; _i71 < _list70.Count; ++_i71) { MMIStandard.MConstraint _elem72; _elem72 = new MMIStandard.MConstraint(); _elem72.Read(iprot); Constraints.Add(_elem72); } iprot.ReadListEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 6: if (field.Type == TType.String) { StartCondition = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 7: if (field.Type == TType.String) { EndCondition = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 8: if (field.Type == TType.String) { Action = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 9: if (field.Type == TType.List) { { Instructions = new List <MInstruction>(); TList _list73 = iprot.ReadListBegin(); for (int _i74 = 0; _i74 < _list73.Count; ++_i74) { MInstruction _elem75; _elem75 = new MInstruction(); _elem75.Read(iprot); Instructions.Add(_elem75); } iprot.ReadListEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; default: TProtocolUtil.Skip(iprot, field.Type); break; } iprot.ReadFieldEnd(); } iprot.ReadStructEnd(); if (!isset_ID) { throw new TProtocolException(TProtocolException.INVALID_DATA, "required field ID not set"); } if (!isset_Name) { throw new TProtocolException(TProtocolException.INVALID_DATA, "required field Name not set"); } if (!isset_MotionType) { throw new TProtocolException(TProtocolException.INVALID_DATA, "required field MotionType not set"); } } finally { iprot.DecrementRecursionDepth(); } }
public void Read(TProtocol iprot) { iprot.IncrementRecursionDepth(); try { bool isset_Initial = false; bool isset_Current = false; TField field; iprot.ReadStructBegin(); while (true) { field = iprot.ReadFieldBegin(); if (field.Type == TType.Stop) { break; } switch (field.ID) { case 1: if (field.Type == TType.Struct) { Initial = new MMIStandard.MAvatarPostureValues(); Initial.Read(iprot); isset_Initial = true; } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 2: if (field.Type == TType.Struct) { Current = new MMIStandard.MAvatarPostureValues(); Current.Read(iprot); isset_Current = true; } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 3: if (field.Type == TType.List) { { Constraints = new List <MMIStandard.MConstraint>(); TList _list0 = iprot.ReadListBegin(); for (int _i1 = 0; _i1 < _list0.Count; ++_i1) { MMIStandard.MConstraint _elem2; _elem2 = new MMIStandard.MConstraint(); _elem2.Read(iprot); Constraints.Add(_elem2); } iprot.ReadListEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 4: if (field.Type == TType.List) { { SceneManipulations = new List <MMIStandard.MSceneManipulation>(); TList _list3 = iprot.ReadListBegin(); for (int _i4 = 0; _i4 < _list3.Count; ++_i4) { MMIStandard.MSceneManipulation _elem5; _elem5 = new MMIStandard.MSceneManipulation(); _elem5.Read(iprot); SceneManipulations.Add(_elem5); } iprot.ReadListEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 5: if (field.Type == TType.List) { { Events = new List <MSimulationEvent>(); TList _list6 = iprot.ReadListBegin(); for (int _i7 = 0; _i7 < _list6.Count; ++_i7) { MSimulationEvent _elem8; _elem8 = new MSimulationEvent(); _elem8.Read(iprot); Events.Add(_elem8); } iprot.ReadListEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; default: TProtocolUtil.Skip(iprot, field.Type); break; } iprot.ReadFieldEnd(); } iprot.ReadStructEnd(); if (!isset_Initial) { throw new TProtocolException(TProtocolException.INVALID_DATA, "required field Initial not set"); } if (!isset_Current) { throw new TProtocolException(TProtocolException.INVALID_DATA, "required field Current not set"); } } finally { iprot.DecrementRecursionDepth(); } }
public void Read(TProtocol iprot) { iprot.IncrementRecursionDepth(); try { bool isset_Name = false; bool isset_ID = false; bool isset_AssemblyName = false; bool isset_MotionType = false; bool isset_Language = false; bool isset_Author = false; bool isset_Version = false; TField field; iprot.ReadStructBegin(); while (true) { field = iprot.ReadFieldBegin(); if (field.Type == TType.Stop) { break; } switch (field.ID) { case 1: if (field.Type == TType.String) { Name = iprot.ReadString(); isset_Name = true; } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 2: if (field.Type == TType.String) { ID = iprot.ReadString(); isset_ID = true; } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 3: if (field.Type == TType.String) { AssemblyName = iprot.ReadString(); isset_AssemblyName = true; } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 4: if (field.Type == TType.String) { MotionType = iprot.ReadString(); isset_MotionType = true; } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 6: if (field.Type == TType.String) { Language = iprot.ReadString(); isset_Language = true; } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 7: if (field.Type == TType.String) { Author = iprot.ReadString(); isset_Author = true; } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 8: if (field.Type == TType.String) { Version = iprot.ReadString(); isset_Version = true; } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 9: if (field.Type == TType.List) { { Prerequisites = new List <MMIStandard.MConstraint>(); TList _list41 = iprot.ReadListBegin(); for (int _i42 = 0; _i42 < _list41.Count; ++_i42) { MMIStandard.MConstraint _elem43; _elem43 = new MMIStandard.MConstraint(); _elem43.Read(iprot); Prerequisites.Add(_elem43); } iprot.ReadListEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 11: if (field.Type == TType.Map) { { Properties = new Dictionary <string, string>(); TMap _map44 = iprot.ReadMapBegin(); for (int _i45 = 0; _i45 < _map44.Count; ++_i45) { string _key46; string _val47; _key46 = iprot.ReadString(); _val47 = iprot.ReadString(); Properties[_key46] = _val47; } iprot.ReadMapEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 12: if (field.Type == TType.List) { { Dependencies = new List <MDependency>(); TList _list48 = iprot.ReadListBegin(); for (int _i49 = 0; _i49 < _list48.Count; ++_i49) { MDependency _elem50; _elem50 = new MDependency(); _elem50.Read(iprot); Dependencies.Add(_elem50); } iprot.ReadListEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 13: if (field.Type == TType.List) { { Events = new List <string>(); TList _list51 = iprot.ReadListBegin(); for (int _i52 = 0; _i52 < _list51.Count; ++_i52) { string _elem53; _elem53 = iprot.ReadString(); Events.Add(_elem53); } iprot.ReadListEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 14: if (field.Type == TType.String) { LongDescription = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 15: if (field.Type == TType.String) { ShortDescription = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 16: if (field.Type == TType.List) { { Parameters = new List <MMIStandard.MParameter>(); TList _list54 = iprot.ReadListBegin(); for (int _i55 = 0; _i55 < _list54.Count; ++_i55) { MMIStandard.MParameter _elem56; _elem56 = new MMIStandard.MParameter(); _elem56.Read(iprot); Parameters.Add(_elem56); } iprot.ReadListEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 17: if (field.Type == TType.List) { { SceneParameters = new List <MMIStandard.MParameter>(); TList _list57 = iprot.ReadListBegin(); for (int _i58 = 0; _i58 < _list57.Count; ++_i58) { MMIStandard.MParameter _elem59; _elem59 = new MMIStandard.MParameter(); _elem59.Read(iprot); SceneParameters.Add(_elem59); } iprot.ReadListEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 18: if (field.Type == TType.String) { Vendor = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 19: if (field.Type == TType.String) { VendorDomain = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 20: if (field.Type == TType.String) { MmuUrl = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 21: if (field.Type == TType.String) { UpdateUrl = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; default: TProtocolUtil.Skip(iprot, field.Type); break; } iprot.ReadFieldEnd(); } iprot.ReadStructEnd(); if (!isset_Name) { throw new TProtocolException(TProtocolException.INVALID_DATA, "required field Name not set"); } if (!isset_ID) { throw new TProtocolException(TProtocolException.INVALID_DATA, "required field ID not set"); } if (!isset_AssemblyName) { throw new TProtocolException(TProtocolException.INVALID_DATA, "required field AssemblyName not set"); } if (!isset_MotionType) { throw new TProtocolException(TProtocolException.INVALID_DATA, "required field MotionType not set"); } if (!isset_Language) { throw new TProtocolException(TProtocolException.INVALID_DATA, "required field Language not set"); } if (!isset_Author) { throw new TProtocolException(TProtocolException.INVALID_DATA, "required field Author not set"); } if (!isset_Version) { throw new TProtocolException(TProtocolException.INVALID_DATA, "required field Version not set"); } } finally { iprot.DecrementRecursionDepth(); } }