Package org.omg.DynamicAny

Examples of org.omg.DynamicAny.DynArray


       dynFactory = org.omg.DynamicAny.DynAnyFactoryHelper.narrow(obj);
   }

   public void testInsertAnyObject() throws Exception
   {
       DynArray dyn_array = null;

       org.omg.CORBA.Object  obj = orb.string_to_object (nameService);

       TypeCode tc = org.omg.CosNaming.NamingContextExtHelper.type();

       TypeCode array_tc =
           orb.create_array_tc (3, tc);

       dyn_array =
           (DynArray) dynFactory.create_dyn_any_from_type_code (array_tc);


       Any [] object_array = new Any[3];
       object_array[0] = orb.create_any();
       object_array[1] = orb.create_any();
       object_array[2] = orb.create_any();
       object_array[0].insert_Object (obj);
       object_array[1].insert_Object (obj);
       object_array[2].insert_Object (obj);

       dyn_array.set_elements (object_array);

       dyn_array.to_any();

       dyn_array.destroy();
   }
View Full Code Here


   }


   public void testInsertDynAnyObject() throws Exception
   {
       DynArray dyn_array;

       TypeCode tc = org.omg.CosNaming.NamingContextExtHelper.type();

       TypeCode array_tc =
           orb.create_array_tc (3, tc);

       dyn_array =
           (DynArray) dynFactory.create_dyn_any_from_type_code (array_tc);


       DynAny [] object_array = new DynAny[3];

       object_array[0] = dynFactory.create_dyn_any_from_type_code (tc);
       object_array[1] = dynFactory.create_dyn_any_from_type_code (tc);
       object_array[2] = dynFactory.create_dyn_any_from_type_code (tc);

       dyn_array.set_elements_as_dyn_any (object_array);

       dyn_array.to_any();

       dyn_array.destroy();
   }
View Full Code Here

        }
        else if ("array".equals (type))
        {
            try
            {
                DynArray dynArray = DynArrayHelper.narrow
                    (factory.create_dyn_any(value));

                dynArray.to_any();
            }
            catch (org.omg.DynamicAny.DynAnyFactoryPackage.InconsistentTypeCode e)
            {
                throw new INTERNAL();
            }
View Full Code Here

      + "01C00000000000100010000000105010001000101090000000105010001";


   public void testInsertAnyObject() throws Exception
   {
       DynArray dyn_array = null;

       org.omg.CORBA.Object  obj = orb.string_to_object (nameService);

       TypeCode tc = org.omg.CosNaming.NamingContextExtHelper.type();

       TypeCode array_tc =
           orb.create_array_tc (3, tc);

       dyn_array =
           (DynArray) factory.create_dyn_any_from_type_code (array_tc);


       Any [] object_array = new Any[3];
       object_array[0] = orb.create_any();
       object_array[1] = orb.create_any();
       object_array[2] = orb.create_any();
       object_array[0].insert_Object (obj);
       object_array[1].insert_Object (obj);
       object_array[2].insert_Object (obj);

       dyn_array.set_elements (object_array);

       dyn_array.to_any();

       dyn_array.destroy();
   }
View Full Code Here

       dyn_array.destroy();
   }

   public void testInsertDynAnyObject() throws Exception
   {
       DynArray dyn_array;

       TypeCode tc = org.omg.CosNaming.NamingContextExtHelper.type();

       TypeCode array_tc =
           orb.create_array_tc (3, tc);

       dyn_array =
           (DynArray) factory.create_dyn_any_from_type_code (array_tc);


       DynAny [] object_array = new DynAny[3];

       object_array[0] = factory.create_dyn_any_from_type_code (tc);
       object_array[1] = factory.create_dyn_any_from_type_code (tc);
       object_array[2] = factory.create_dyn_any_from_type_code (tc);

       dyn_array.set_elements_as_dyn_any (object_array);

       dyn_array.to_any();

       dyn_array.destroy();
   }
View Full Code Here

                    System.out.println("[Server]: ** Sequence of length " + contents.length + " **");
                    for( int i = 0; i < contents.length; i++)
                        printAny( contents[i]);
                    break;
                case TCKind._tk_array:
                    DynArray dynarray = (DynArray)factory.create_dyn_any( a );
                    Any[] array_contents = dynarray.get_elements();
                    System.out.println("[Server]: ** Array **");
                    for( int i = 0; i < array_contents.length; i++)
                        printAny( array_contents[i]);
                    break;
                default:
View Full Code Here

        // array

        TypeCode array_tc =
            orb.create_array_tc( 3, orb.create_string_tc(0));
        DynArray dyn_array =
            (DynArray)dynFactory.create_dyn_any_from_type_code( array_tc );

        string_sequence = new Any[3];
        string_sequence[0] = orb.create_any();
        string_sequence[1] = orb.create_any();
        string_sequence[2] = orb.create_any();
        string_sequence[0].insert_string("hello");
        string_sequence[1].insert_string("another");
        string_sequence[2].insert_string("world");
        dyn_array.set_elements( string_sequence );

        System.out.println("[Client]: Passing an array of length " +
                dyn_array.component_count() +
                "..." +  s.generic( dyn_array.to_any() ) );
        dyn_array.destroy();

        // struct

        /*
         * the hardest part is coming up with a correct call to
View Full Code Here


    @Test
    public void testInsertAnyObject() throws Exception
   {
       DynArray dyn_array = null;

       org.omg.CORBA.Object  obj = orb.string_to_object (nameService);

       TypeCode tc = org.omg.CosNaming.NamingContextExtHelper.type();

       TypeCode array_tc =
           orb.create_array_tc (3, tc);

       dyn_array =
           (DynArray) factory.create_dyn_any_from_type_code (array_tc);


       Any [] object_array = new Any[3];
       object_array[0] = orb.create_any();
       object_array[1] = orb.create_any();
       object_array[2] = orb.create_any();
       object_array[0].insert_Object (obj);
       object_array[1].insert_Object (obj);
       object_array[2].insert_Object (obj);

       dyn_array.set_elements (object_array);

       dyn_array.to_any();

       dyn_array.destroy();
   }
View Full Code Here

   }

    @Test
    public void testInsertDynAnyObject() throws Exception
   {
       DynArray dyn_array;

       TypeCode tc = org.omg.CosNaming.NamingContextExtHelper.type();

       TypeCode array_tc =
           orb.create_array_tc (3, tc);

       dyn_array =
           (DynArray) factory.create_dyn_any_from_type_code (array_tc);


       DynAny [] object_array = new DynAny[3];

       object_array[0] = factory.create_dyn_any_from_type_code (tc);
       object_array[1] = factory.create_dyn_any_from_type_code (tc);
       object_array[2] = factory.create_dyn_any_from_type_code (tc);

       dyn_array.set_elements_as_dyn_any (object_array);

       dyn_array.to_any();

       dyn_array.destroy();
   }
View Full Code Here

        }
        else if ("array".equals (type))
        {
            try
            {
                DynArray dynArray = DynArrayHelper.narrow
                    (factory.create_dyn_any(value));

                dynArray.to_any();
            }
            catch (org.omg.DynamicAny.DynAnyFactoryPackage.InconsistentTypeCode e)
            {
                throw new INTERNAL();
            }
View Full Code Here

TOP

Related Classes of org.omg.DynamicAny.DynArray

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.