// **********************************************************************
//
// Generated by the ORBacus IDL to Java Translator
//
// Copyright (c) 2000
// Object Oriented Concepts, Inc.
// Billerica, MA, USA
//
// All Rights Reserved
//
// **********************************************************************

// Version: 4.0.5

package edu.iris.Fissures.IfNetwork;

//
// IDL:iris.edu/Fissures/IfNetwork/Response:1.0
//
final public class ResponseHelper
{
    public static void
    insert(org.omg.CORBA.Any any, Response val)
    {
        org.omg.CORBA.portable.OutputStream out = any.create_output_stream();
        write(out, val);
        any.read_value(out.create_input_stream(), type());
    }

    public static Response
    extract(org.omg.CORBA.Any any)
    {
        if(any.type().equivalent(type()))
            return read(any.create_input_stream());
        else
            throw new org.omg.CORBA.BAD_OPERATION();
    }

    private static org.omg.CORBA.TypeCode typeCode_;

    public static org.omg.CORBA.TypeCode
    type()
    {
        if(typeCode_ == null)
        {
            org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init();
            org.omg.CORBA.StructMember[] members = new org.omg.CORBA.StructMember[2];

            members[0] = new org.omg.CORBA.StructMember();
            members[0].name = "the_sensitivity";
            members[0].type = SensitivityHelper.type();

            members[1] = new org.omg.CORBA.StructMember();
            members[1].name = "stages";
            members[1].type = StageSeqHelper.type();

            typeCode_ = orb.create_struct_tc(id(), "Response", members);
        }

        return typeCode_;
    }

    public static String
    id()
    {
        return "IDL:iris.edu/Fissures/IfNetwork/Response:1.0";
    }

    public static Response
    read(org.omg.CORBA.portable.InputStream in)
    {
        Response _ob_v = new Response();
        _ob_v.the_sensitivity = SensitivityHelper.read(in);
        _ob_v.stages = StageSeqHelper.read(in);
        return _ob_v;
    }

    public static void
    write(org.omg.CORBA.portable.OutputStream out, Response val)
    {
        SensitivityHelper.write(out, val.the_sensitivity);
        StageSeqHelper.write(out, val.stages);
    }
}
