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