package test.interop.bug360;


/**
 * Generated from IDL struct "Struct1".
 *
 * @author JacORB IDL compiler V @project.version@
 * @version generated at 25-Feb-2014 13:44:20
 */

public abstract class Struct1Helper
{
	private volatile static org.omg.CORBA.TypeCode _type;
	public static org.omg.CORBA.TypeCode type ()
	{
		if (_type == null)
		{
			synchronized(Struct1Helper.class)
			{
				if (_type == null)
				{
					_type = org.omg.CORBA.ORB.init().create_struct_tc(test.interop.bug360.Struct1Helper.id(),"Struct1",new org.omg.CORBA.StructMember[]{new org.omg.CORBA.StructMember("s1F1", org.omg.CORBA.ORB.init().get_primitive_tc(org.omg.CORBA.TCKind.from_int(5)), null),new org.omg.CORBA.StructMember("s1F2", org.omg.CORBA.ORB.init().create_struct_tc(test.interop.bug360.Struct2Helper.id(),"Struct2",new org.omg.CORBA.StructMember[]{new org.omg.CORBA.StructMember("S2F1xxxxxxxxxxx", org.omg.CORBA.ORB.init().create_enum_tc(test.interop.bug360.Enum1Helper.id(),"Enum1",new String[]{"E1Axxxxxxxxxxxxxxxxxxxxx","E1B","E1C","E1D","E1E","E1F","E1G","E1H","E1I","E1JX","E1KX","E1LX","E1MX","E1Lastxxxxxxxxxxxxx"}), null),new org.omg.CORBA.StructMember("S2F2xxxxxxx", org.omg.CORBA.ORB.init().get_primitive_tc(org.omg.CORBA.TCKind.from_int(5)), null),new org.omg.CORBA.StructMember("S23", org.omg.CORBA.ORB.init().get_primitive_tc(org.omg.CORBA.TCKind.from_int(6)), null),new org.omg.CORBA.StructMember("S2F4xxxxxxxx", org.omg.CORBA.ORB.init().create_enum_tc(test.interop.bug360.Enum2xxxxxxxxxxxxHelper.id(),"Enum2xxxxxxxxxxxx",new String[]{"E2Axxxxxxxxxxxxxxxxxx","E2Bxxxxxxxx","E2Cxxxxxx","E2Dxxxxxxxxxxxxx"}), null),new org.omg.CORBA.StructMember("S2F5xxx", org.omg.CORBA.ORB.init().get_primitive_tc(org.omg.CORBA.TCKind.from_int(6)), null),new org.omg.CORBA.StructMember("S2F6x", org.omg.CORBA.ORB.init().get_primitive_tc(org.omg.CORBA.TCKind.from_int(6)), null),new org.omg.CORBA.StructMember("S2F7xxxxxxxx", org.omg.CORBA.ORB.init().create_enum_tc(test.interop.bug360.Enum2xxxxxxxxxxxxHelper.id(),"Enum2xxxxxxxxxxxx",new String[]{"E2Axxxxxxxxxxxxxxxxxx","E2Bxxxxxxxx","E2Cxxxxxx","E2Dxxxxxxxxxxxxx"}), null),new org.omg.CORBA.StructMember("S2F8xxxxxxxxxxxx", org.omg.CORBA.ORB.init().create_enum_tc(test.interop.bug360.Enum3xxxxxxxxxxxxxxxxHelper.id(),"Enum3xxxxxxxxxxxxxxxx",new String[]{"E3Axxxxxxxxxxxxxxxxxxxxxx","E3Bxxxxxxxxxxx","E3Cxxxxxxxxxxx","E3Dxxxxxxxxxxxxxxxxx"}), null),new org.omg.CORBA.StructMember("S2F9xxx", org.omg.CORBA.ORB.init().get_primitive_tc(org.omg.CORBA.TCKind.from_int(6)), null),new org.omg.CORBA.StructMember("S2F10xxxxxxxx", org.omg.CORBA.ORB.init().create_enum_tc(test.interop.bug360.Enum4xxxxxxxxxxxxxHelper.id(),"Enum4xxxxxxxxxxxxx",new String[]{"E4Axxxxxxxxxxxxxxxxxxx","E4Bxxxxxxx","E4Cxxxxxxxxxxx","E4Dxxxxxxxx","E4Exxxxxxxxxxxxxx"}), null),new org.omg.CORBA.StructMember("S2F11xxxxxx", org.omg.CORBA.ORB.init().create_struct_tc(test.interop.bug360.Struct3Helper.id(),"Struct3",new org.omg.CORBA.StructMember[]{new org.omg.CORBA.StructMember("S3F1xxxx", org.omg.CORBA.ORB.init().create_enum_tc(test.interop.bug360.Enum5xxxxxxxxHelper.id(),"Enum5xxxxxxxx",new String[]{"E5Axxxxxxxxxxxxxx","E5Bxxxxxxxx","E5Cxxxxxxxxx","E5Dxxxxxxx","E5Exxx","E5Fxxxxx","E5Gxxxxxxx","E5Hxxxxxxxxx"}), null),new org.omg.CORBA.StructMember("S3F2xxxxxxx", org.omg.CORBA.ORB.init().get_primitive_tc(org.omg.CORBA.TCKind.from_int(6)), null),new org.omg.CORBA.StructMember("S3F3xxxxxxx", org.omg.CORBA.ORB.init().get_primitive_tc(org.omg.CORBA.TCKind.from_int(6)), null),new org.omg.CORBA.StructMember("S3F4xxxxxxx", org.omg.CORBA.ORB.init().create_enum_tc(test.interop.bug360.Enum6xxxxxxxxxxxxxxxxxHelper.id(),"Enum6xxxxxxxxxxxxxxxxx",new String[]{"E6Axxxxxxxxxxxxxxxxxxxxxxx","E6Bxxxxxxxxxxxxx","E6Cxxxxxxxxxxxxx","E6Dxxxxxxxxxxxxxxxxxx"}), null)}), null)}), null)});
				}
			}
		}
		return _type;
	}

	public static void insert (final org.omg.CORBA.Any any, final test.interop.bug360.Struct1 s)
	{
		any.type(type());
		write( any.create_output_stream(),s);
	}

	public static test.interop.bug360.Struct1 extract (final org.omg.CORBA.Any any)
	{
		org.omg.CORBA.portable.InputStream in = any.create_input_stream();
		try
		{
			return read (in);
		}
		finally
		{
			try
			{
				in.close();
			}
			catch (java.io.IOException e)
			{
			throw new RuntimeException("Unexpected exception " + e.toString() );
			}
		}
	}

	public static String id()
	{
		return "IDL:test/interop/bug360/Struct1:1.0";
	}
	public static test.interop.bug360.Struct1 read (final org.omg.CORBA.portable.InputStream in)
	{
		test.interop.bug360.Struct1 result = new test.interop.bug360.Struct1();
		result.s1F1=in.read_ulong();
		result.s1F2=test.interop.bug360.Struct2Helper.read(in);
		return result;
	}
	public static void write (final org.omg.CORBA.portable.OutputStream out, final test.interop.bug360.Struct1 s)
	{
		out.write_ulong(s.s1F1);
		test.interop.bug360.Struct2Helper.write(out,s.s1F2);
	}
}
