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