Package org.omg.DynamicAny

Examples of org.omg.DynamicAny.DynEnum


                else if( members[i].label.type().kind() == org.omg.CORBA.TCKind.tk_enum )
                {
                    // int val = members[i].label.extract_long();
                    try
                    {
                        DynEnum dEnum =
                            DynEnumHelper.narrow(
                                  factory.create_dyn_any( members[i].label ));

                        // print("case " + members[i].label.type().member_name(val) + " : " +
                       print("case " + dEnum.get_as_string() + " : " +
                              TypeCode.idlTypeName(members[i].type) + " " +
                              members[i].name + ";" + "\n");
                    }
                    catch( Exception bk )
                    {
View Full Code Here


        Any av;
        DynAny d1 = null;
        DynAny d2 = null;
        DynAny copy = null;
        String str;
        DynEnum e1;
        DynEnum e2;
        TestEnum e;
        TypeCode type = TestEnumHelper.type();

        //
        // Test: initial value
View Full Code Here

                else if( members[i].label.type().kind() == org.omg.CORBA.TCKind.tk_enum )
                {
                    // int val = members[i].label.extract_long();
                    try
                    {
                        DynEnum dEnum =
                            DynEnumHelper.narrow(
                                  factory.create_dyn_any( members[i].label ));

                        // print("case " + members[i].label.type().member_name(val) + " : " +
                       print("case " + dEnum.get_as_string() + " : " +
                              TypeCode.idlTypeName(members[i].type) + " " +
                              members[i].name + ";" + "\n");
                    }
                    catch( Exception bk )
                    {
View Full Code Here

                    break;
                case TCKind._tk_string:
                    System.out.println("[Server]: String: " + a.extract_string());
                    break;
                case TCKind._tk_enum:
                    DynEnum dynEnum = (DynEnum)factory.create_dyn_any(a);
                    System.out.println("[Server]: ** Enum **");
                    System.out.println( dynEnum.get_as_string());
                    break;
                case TCKind._tk_struct:
                    DynStruct dynstruct = (DynStruct)factory.create_dyn_any( a );
                    org.omg.DynamicAny.NameValuePair[] members = dynstruct.get_members();
                    System.out.println("[Server]: ** Struct **");
 
View Full Code Here

                    "blue",
                    "mauve",
                    "magenta",
            "salmon"});

        DynEnum dyn_enum =
            (DynEnum)dynFactory.create_dyn_any_from_type_code( enum_tc );

        dyn_enum.set_as_string("salmon");
        System.out.println("[Client]: Passing an enum value..." +
                s.generic( dyn_enum.to_any() ) );

        // sequence

        TypeCode seq_tc =
            orb.create_sequence_tc( 2, orb.create_string_tc(0));
View Full Code Here

                else if( members[i].label.type().kind() == org.omg.CORBA.TCKind.tk_enum )
                {
                    // int val = members[i].label.extract_long();
                    try
                    {
                        DynEnum dEnum =
                            DynEnumHelper.narrow(
                                  factory.create_dyn_any( members[i].label ));

                        // print("case " + members[i].label.type().member_name(val) + " : " +
                       print("case " + dEnum.get_as_string() + " : " +
                              TypeCode.idlTypeName(members[i].type) + " " +
                              members[i].name + ";" + "\n");
                    }
                    catch( Exception bk )
                    {
View Full Code Here

TOP

Related Classes of org.omg.DynamicAny.DynEnum

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.