/*
 * File: ./Calculations/_ComputeImplBase.java
 * From: ../step2/Calculations.idl
 * Date: Tue Aug 17 09:33:51 1999
 *   By: idltojava Java IDL 1.2 Nov 12 1997 12:23:47
 */

package Calculations;
public abstract class _ComputeImplBase extends org.omg.CORBA.DynamicImplementation implements Calculations.Compute {
    // Constructor
    public _ComputeImplBase() {
         super();
    }
    // Type strings for this class and its superclases
    private static final String _type_ids[] = {
        "IDL:Calculations/Compute:1.0"
    };

    public String[] _ids() { return (String[]) _type_ids.clone(); }

    private static java.util.Dictionary _methods = new java.util.Hashtable();
    static {
      _methods.put("executeCalculation", new java.lang.Integer(0));
      _methods.put("tellmeWhoYouAre", new java.lang.Integer(1));
     }
    // DSI Dispatch call
    public void invoke(org.omg.CORBA.ServerRequest r) {
       switch (((java.lang.Integer) _methods.get(r.op_name())).intValue()) {
           case 0: // Calculations.Compute.executeCalculation
              {
              org.omg.CORBA.NVList _list = _orb().create_list(0);
              org.omg.CORBA.Any _i = _orb().create_any();
              _i.type(org.omg.CORBA.ORB.init().get_primitive_tc(org.omg.CORBA.TCKind.tk_long));
              _list.add_value("i", _i, org.omg.CORBA.ARG_IN.value);
              r.params(_list);
              int i;
              i = _i.extract_long();
              int ___result;
                            ___result = this.executeCalculation(i);
              org.omg.CORBA.Any __result = _orb().create_any();
              __result.insert_long(___result);
              r.result(__result);
              }
              break;
           case 1: // Calculations.Compute.tellmeWhoYouAre
              {
              org.omg.CORBA.NVList _list = _orb().create_list(0);
              org.omg.CORBA.Any _name = _orb().create_any();
              _name.type(org.omg.CORBA.ORB.init().get_primitive_tc(org.omg.CORBA.TCKind.tk_string));
              _list.add_value("name", _name, org.omg.CORBA.ARG_IN.value);
              r.params(_list);
              String name;
              name = _name.extract_string();
              String ___result;
                            ___result = this.tellmeWhoYouAre(name);
              org.omg.CORBA.Any __result = _orb().create_any();
              __result.insert_string(___result);
              r.result(__result);
              }
              break;
            default:
              throw new org.omg.CORBA.BAD_OPERATION(0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE);
       }
 }
}
