package test.interop.bug360;


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

public abstract class Struct3Helper
{
	private volatile static org.omg.CORBA.TypeCode _type;
	public static org.omg.CORBA.TypeCode type ()
	{
		if (_type == null)
		{
			synchronized(Struct3Helper.class)
			{
				if (_type == null)
				{
					_type = 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)});
				}
			}
		}
		return _type;
	}

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

	public static test.interop.bug360.Struct3 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/Struct3:1.0";
	}
	public static test.interop.bug360.Struct3 read (final org.omg.CORBA.portable.InputStream in)
	{
		test.interop.bug360.Struct3 result = new test.interop.bug360.Struct3();
		result.S3F1xxxx=test.interop.bug360.Enum5xxxxxxxxHelper.read(in);
		result.S3F2xxxxxxx=in.read_float();
		result.S3F3xxxxxxx=in.read_float();
		result.S3F4xxxxxxx=test.interop.bug360.Enum6xxxxxxxxxxxxxxxxxHelper.read(in);
		return result;
	}
	public static void write (final org.omg.CORBA.portable.OutputStream out, final test.interop.bug360.Struct3 s)
	{
		test.interop.bug360.Enum5xxxxxxxxHelper.write(out,s.S3F1xxxx);
		out.write_float(s.S3F2xxxxxxx);
		out.write_float(s.S3F3xxxxxxx);
		test.interop.bug360.Enum6xxxxxxxxxxxxxxxxxHelper.write(out,s.S3F4xxxxxxx);
	}
}
