1 package org.omg.DynamicAny; 2 3 4 10 11 12 33 abstract public class DynAnyFactoryHelper 34 { 35 private static String _id = "IDL:omg.org/DynamicAny/DynAnyFactory:1.0"; 36 37 public static void insert (org.omg.CORBA.Any a, org.omg.DynamicAny.DynAnyFactory that) 38 { 39 org.omg.CORBA.portable.OutputStream out = a.create_output_stream (); 40 a.type (type ()); 41 write (out, that); 42 a.read_value (out.create_input_stream (), type ()); 43 } 44 45 public static org.omg.DynamicAny.DynAnyFactory extract (org.omg.CORBA.Any a) 46 { 47 return read (a.create_input_stream ()); 48 } 49 50 private static org.omg.CORBA.TypeCode __typeCode = null; 51 synchronized public static org.omg.CORBA.TypeCode type () 52 { 53 if (__typeCode == null) 54 { 55 __typeCode = org.omg.CORBA.ORB.init ().create_interface_tc (org.omg.DynamicAny.DynAnyFactoryHelper.id (), "DynAnyFactory"); 56 } 57 return __typeCode; 58 } 59 60 public static String id () 61 { 62 return _id; 63 } 64 65 public static org.omg.DynamicAny.DynAnyFactory read (org.omg.CORBA.portable.InputStream istream) 66 { 67 throw new org.omg.CORBA.MARSHAL (); 68 } 69 70 public static void write (org.omg.CORBA.portable.OutputStream ostream, org.omg.DynamicAny.DynAnyFactory value) 71 { 72 throw new org.omg.CORBA.MARSHAL (); 73 } 74 75 public static org.omg.DynamicAny.DynAnyFactory narrow (org.omg.CORBA.Object obj) 76 { 77 if (obj == null) 78 return null; 79 else if (obj instanceof org.omg.DynamicAny.DynAnyFactory ) 80 return (org.omg.DynamicAny.DynAnyFactory )obj; 81 else if (!obj._is_a (id ())) 82 throw new org.omg.CORBA.BAD_PARAM (); 83 else 84 { 85 org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl )obj)._get_delegate (); 86 org.omg.DynamicAny._DynAnyFactoryStub stub = new org.omg.DynamicAny._DynAnyFactoryStub (); 87 stub._set_delegate(delegate); 88 return stub; 89 } 90 } 91 92 public static org.omg.DynamicAny.DynAnyFactory unchecked_narrow (org.omg.CORBA.Object obj) 93 { 94 if (obj == null) 95 return null; 96 else if (obj instanceof org.omg.DynamicAny.DynAnyFactory ) 97 return (org.omg.DynamicAny.DynAnyFactory )obj; 98 else 99 { 100 org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl )obj)._get_delegate (); 101 org.omg.DynamicAny._DynAnyFactoryStub stub = new org.omg.DynamicAny._DynAnyFactoryStub (); 102 stub._set_delegate(delegate); 103 return stub; 104 } 105 } 106 107 } 108 | Popular Tags |