Exemplo n.º 1
0
        public void Set(FooHandshake other)
        {
            dt = other.dt;


            if (other.registries == null)
            {
                registries = null;
            }
            else
            {
                registries = new System.Collections.Generic.List <test.FooYoRegistryDefinition>(other.registries.Count);
                for (int i5 = 0; i5 < other.registries.Count; i5++)
                {
                    if (other.registries[i5] == null)
                    {
                        registries.Add(null);
                    }
                    else
                    {
                        test.FooYoRegistryDefinition newElement = test.FooYoRegistryDefinitionPubSubType.Create();
                        test.FooYoRegistryDefinitionPubSubType.Copy(other.registries[i5], newElement);
                        registries.Add(newElement);
                    }
                }
            }

            if (other.variables == null)
            {
                variables = null;
            }
            else
            {
                variables = new System.Collections.Generic.List <test.FooYoVariableDefinition>(other.variables.Count);
                for (int i6 = 0; i6 < other.variables.Count; i6++)
                {
                    if (other.variables[i6] == null)
                    {
                        variables.Add(null);
                    }
                    else
                    {
                        test.FooYoVariableDefinition newElement = test.FooYoVariableDefinitionPubSubType.Create();
                        test.FooYoVariableDefinitionPubSubType.Copy(other.variables[i6], newElement);
                        variables.Add(newElement);
                    }
                }
            }

            if (other.joints == null)
            {
                joints = null;
            }
            else
            {
                joints = new System.Collections.Generic.List <test.FooJointDefinition>(other.joints.Count);
                for (int i7 = 0; i7 < other.joints.Count; i7++)
                {
                    if (other.joints[i7] == null)
                    {
                        joints.Add(null);
                    }
                    else
                    {
                        test.FooJointDefinition newElement = test.FooJointDefinitionPubSubType.Create();
                        test.FooJointDefinitionPubSubType.Copy(other.joints[i7], newElement);
                        joints.Add(newElement);
                    }
                }
            }

            if (other.graphicObjects == null)
            {
                graphicObjects = null;
            }
            else
            {
                graphicObjects = new System.Collections.Generic.List <test.FooGraphicObjectMessage>(other.graphicObjects.Count);
                for (int i8 = 0; i8 < other.graphicObjects.Count; i8++)
                {
                    if (other.graphicObjects[i8] == null)
                    {
                        graphicObjects.Add(null);
                    }
                    else
                    {
                        test.FooGraphicObjectMessage newElement = test.FooGraphicObjectMessagePubSubType.Create();
                        test.FooGraphicObjectMessagePubSubType.Copy(other.graphicObjects[i8], newElement);
                        graphicObjects.Add(newElement);
                    }
                }
            }

            if (other.artifacts == null)
            {
                artifacts = null;
            }
            else
            {
                artifacts = new System.Collections.Generic.List <test.FooGraphicObjectMessage>(other.artifacts.Count);
                for (int i9 = 0; i9 < other.artifacts.Count; i9++)
                {
                    if (other.artifacts[i9] == null)
                    {
                        artifacts.Add(null);
                    }
                    else
                    {
                        test.FooGraphicObjectMessage newElement = test.FooGraphicObjectMessagePubSubType.Create();
                        test.FooGraphicObjectMessagePubSubType.Copy(other.artifacts[i9], newElement);
                        artifacts.Add(newElement);
                    }
                }
            }

            if (other.enumTypes == null)
            {
                enumTypes = null;
            }
            else
            {
                enumTypes = new System.Collections.Generic.List <test.FooEnumType>(other.enumTypes.Count);
                for (int i10 = 0; i10 < other.enumTypes.Count; i10++)
                {
                    if (other.enumTypes[i10] == null)
                    {
                        enumTypes.Add(null);
                    }
                    else
                    {
                        test.FooEnumType newElement = test.FooEnumTypePubSubType.Create();
                        test.FooEnumTypePubSubType.Copy(other.enumTypes[i10], newElement);
                        enumTypes.Add(newElement);
                    }
                }
            }
            test.FooSummaryPubSubType.Copy(other.summary, summary);
        }
        public static void read(test.FooHandshake data, Halodi.CDR.CDRDeserializer cdr)
        {
            data.dt = cdr.read_type_6();


            int registries_length = cdr.read_type_2();

            data.registries = new System.Collections.Generic.List <test.FooYoRegistryDefinition>(registries_length);
            for (int i = 0; i < registries_length; i++)
            {
                test.FooYoRegistryDefinition new_registries = test.FooYoRegistryDefinitionPubSubType.Create();
                test.FooYoRegistryDefinitionPubSubType.read(new_registries, cdr);
                data.registries.Add(new_registries);
            }



            int variables_length = cdr.read_type_2();

            data.variables = new System.Collections.Generic.List <test.FooYoVariableDefinition>(variables_length);
            for (int i = 0; i < variables_length; i++)
            {
                test.FooYoVariableDefinition new_variables = test.FooYoVariableDefinitionPubSubType.Create();
                test.FooYoVariableDefinitionPubSubType.read(new_variables, cdr);
                data.variables.Add(new_variables);
            }



            int joints_length = cdr.read_type_2();

            data.joints = new System.Collections.Generic.List <test.FooJointDefinition>(joints_length);
            for (int i = 0; i < joints_length; i++)
            {
                test.FooJointDefinition new_joints = test.FooJointDefinitionPubSubType.Create();
                test.FooJointDefinitionPubSubType.read(new_joints, cdr);
                data.joints.Add(new_joints);
            }



            int graphicObjects_length = cdr.read_type_2();

            data.graphicObjects = new System.Collections.Generic.List <test.FooGraphicObjectMessage>(graphicObjects_length);
            for (int i = 0; i < graphicObjects_length; i++)
            {
                test.FooGraphicObjectMessage new_graphicObjects = test.FooGraphicObjectMessagePubSubType.Create();
                test.FooGraphicObjectMessagePubSubType.read(new_graphicObjects, cdr);
                data.graphicObjects.Add(new_graphicObjects);
            }



            int artifacts_length = cdr.read_type_2();

            data.artifacts = new System.Collections.Generic.List <test.FooGraphicObjectMessage>(artifacts_length);
            for (int i = 0; i < artifacts_length; i++)
            {
                test.FooGraphicObjectMessage new_artifacts = test.FooGraphicObjectMessagePubSubType.Create();
                test.FooGraphicObjectMessagePubSubType.read(new_artifacts, cdr);
                data.artifacts.Add(new_artifacts);
            }



            int enumTypes_length = cdr.read_type_2();

            data.enumTypes = new System.Collections.Generic.List <test.FooEnumType>(enumTypes_length);
            for (int i = 0; i < enumTypes_length; i++)
            {
                test.FooEnumType new_enumTypes = test.FooEnumTypePubSubType.Create();
                test.FooEnumTypePubSubType.read(new_enumTypes, cdr);
                data.enumTypes.Add(new_enumTypes);
            }


            data.summary = test.FooSummaryPubSubType.Create();
            test.FooSummaryPubSubType.read(data.summary, cdr);
        }