1 package org.omg.DynamicAny; 2 3 4 10 11 12 17 abstract public class DynArrayHelper 18 { 19 private static String _id = "IDL:omg.org/DynamicAny/DynArray:1.0"; 20 21 public static void insert (org.omg.CORBA.Any a, org.omg.DynamicAny.DynArray that) 22 { 23 org.omg.CORBA.portable.OutputStream out = a.create_output_stream (); 24 a.type (type ()); 25 write (out, that); 26 a.read_value (out.create_input_stream (), type ()); 27 } 28 29 public static org.omg.DynamicAny.DynArray extract (org.omg.CORBA.Any a) 30 { 31 return read (a.create_input_stream ()); 32 } 33 34 private static org.omg.CORBA.TypeCode __typeCode = null; 35 synchronized public static org.omg.CORBA.TypeCode type () 36 { 37 if (__typeCode == null) 38 { 39 __typeCode = org.omg.CORBA.ORB.init ().create_interface_tc (org.omg.DynamicAny.DynArrayHelper.id (), "DynArray"); 40 } 41 return __typeCode; 42 } 43 44 public static String id () 45 { 46 return _id; 47 } 48 49 public static org.omg.DynamicAny.DynArray read (org.omg.CORBA.portable.InputStream istream) 50 { 51 throw new org.omg.CORBA.MARSHAL (); 52 } 53 54 public static void write (org.omg.CORBA.portable.OutputStream ostream, org.omg.DynamicAny.DynArray value) 55 { 56 throw new org.omg.CORBA.MARSHAL (); 57 } 58 59 public static org.omg.DynamicAny.DynArray narrow (org.omg.CORBA.Object obj) 60 { 61 if (obj == null) 62 return null; 63 else if (obj instanceof org.omg.DynamicAny.DynArray ) 64 return (org.omg.DynamicAny.DynArray )obj; 65 else if (!obj._is_a (id ())) 66 throw new org.omg.CORBA.BAD_PARAM (); 67 else 68 { 69 org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl )obj)._get_delegate (); 70 org.omg.DynamicAny._DynArrayStub stub = new org.omg.DynamicAny._DynArrayStub (); 71 stub._set_delegate(delegate); 72 return stub; 73 } 74 } 75 76 public static org.omg.DynamicAny.DynArray unchecked_narrow (org.omg.CORBA.Object obj) 77 { 78 if (obj == null) 79 return null; 80 else if (obj instanceof org.omg.DynamicAny.DynArray ) 81 return (org.omg.DynamicAny.DynArray )obj; 82 else 83 { 84 org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl )obj)._get_delegate (); 85 org.omg.DynamicAny._DynArrayStub stub = new org.omg.DynamicAny._DynArrayStub (); 86 stub._set_delegate(delegate); 87 return stub; 88 } 89 } 90 91 } 92 | Popular Tags |