/*
 * Copyright (c) 1999 Software Architects, All Rights Reserved.
 *
 * Permission to use, copy, modify, and distribute this software
 * and its documentation for NON-COMMERCIAL purposes and without
 * fee is hereby granted provided that this copyright notice
 * appears in all copies.
 *
 * SOFTWARE ARCHITECTS MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE
 * SUITABILITY OF THE SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING
 * BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. SOFTWARE 
 * ARCHITECTS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE 
 * AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS 
 * DERIVATIVES.
 */

/*
 * File: ./REMOTEINTERFACE/REMOTEPLAYERHELPER.JAVA
 * From: REMOTE.IDL
 * Date: Thu Jan 21 23:55:04 1999
 *   By: C:\JDK1.2\BIN\IDLTOJ~1.EXE Java IDL 1.2 Nov 10 1997 13:52:11
 */

package RemoteInterface;
public class RemotePlayerHelper {
     // It is useless to have instances of this class
     private RemotePlayerHelper() { }

    public static void write(org.omg.CORBA.portable.OutputStream out, RemoteInterface.RemotePlayer that) {
        out.write_Object(that);
    }
    public static RemoteInterface.RemotePlayer read(org.omg.CORBA.portable.InputStream in) {
        return RemoteInterface.RemotePlayerHelper.narrow(in.read_Object());
    }
   public static RemoteInterface.RemotePlayer extract(org.omg.CORBA.Any a) {
     org.omg.CORBA.portable.InputStream in = a.create_input_stream();
     return read(in);
   }
   public static void insert(org.omg.CORBA.Any a, RemoteInterface.RemotePlayer that) {
     org.omg.CORBA.portable.OutputStream out = a.create_output_stream();
     write(out, that);
     a.read_value(out.create_input_stream(), type());
   }
   private static org.omg.CORBA.TypeCode _tc;
   synchronized public static org.omg.CORBA.TypeCode type() {
          if (_tc == null)
             _tc = org.omg.CORBA.ORB.init().create_interface_tc(id(), "RemotePlayer");
      return _tc;
   }
   public static String id() {
       return "IDL:RemoteInterface/RemotePlayer:1.0";
   }
   public static RemoteInterface.RemotePlayer narrow(org.omg.CORBA.Object that)
	    throws org.omg.CORBA.BAD_PARAM {
        if (that == null)
            return null;
        if (that instanceof RemoteInterface.RemotePlayer)
            return (RemoteInterface.RemotePlayer) that;
	if (!that._is_a(id())) {
	    throw new org.omg.CORBA.BAD_PARAM();
	}
        org.omg.CORBA.portable.Delegate dup = ((org.omg.CORBA.portable.ObjectImpl)that)._get_delegate();
        RemoteInterface.RemotePlayer result = new RemoteInterface._RemotePlayerStub(dup);
        return result;
   }
}
