001 package org.omg.CORBA;
002 /**
003 * Generated from IDL enum "PrimitiveKind".
004 *
005 * @author JacORB IDL compiler V 2.3.0 (JBoss patch 6), 06-Jun-2007
006 * @version generated at Nov 6, 2011 12:20:22 AM
007 */
008
009 public final class PrimitiveKindHelper
010 {
011 private static org.omg.CORBA.TypeCode _type = null;
012 public static org.omg.CORBA.TypeCode type ()
013 {
014 if (_type == null)
015 {
016 _type = org.omg.CORBA.ORB.init().create_enum_tc(org.omg.CORBA.PrimitiveKindHelper.id(),"PrimitiveKind",new String[]{"pk_null","pk_void","pk_short","pk_long","pk_ushort","pk_ulong","pk_float","pk_double","pk_boolean","pk_char","pk_octet","pk_any","pk_TypeCode","pk_Principal","pk_string","pk_objref","pk_longlong","pk_ulonglong","pk_longdouble","pk_wchar","pk_wstring","pk_value_base"});
017 }
018 return _type;
019 }
020
021 public static void insert (final org.omg.CORBA.Any any, final org.omg.CORBA.PrimitiveKind s)
022 {
023 any.type(type());
024 write( any.create_output_stream(),s);
025 }
026
027 public static org.omg.CORBA.PrimitiveKind extract (final org.omg.CORBA.Any any)
028 {
029 return read(any.create_input_stream());
030 }
031
032 public static String id()
033 {
034 return "IDL:omg.org/CORBA/PrimitiveKind:1.0";
035 }
036 public static PrimitiveKind read (final org.omg.CORBA.portable.InputStream in)
037 {
038 return PrimitiveKind.from_int(in.read_long());
039 }
040
041 public static void write (final org.omg.CORBA.portable.OutputStream out, final PrimitiveKind s)
042 {
043 out.write_long(s.value());
044 }
045 }