//Generated by the IDL-to-C#-compiler MiddCorIdl //Source: C:/project/MC/MinCorNet/DemoJava/Attributes/IDL/Attributes.idl //Dienstag, 22. März 2005, 19:08:45 using System; using System.Collections; using Middsol; //Types namespace Attributes { namespace GreetingsPackage { } } //Interfaces and Value Factories namespace Attributes { public interface Greetings : GreetingsOperations, Middsol.CORBA.Object, Middsol.CORBA.portable.IDLEntity { } } //Interface Operations and Value Types namespace Attributes { public interface GreetingsOperations { string firstName { get; set; } bool bar { get; set; } bool getBar( ); } } //Helpers namespace Attributes { public class GreetingsHelper { private static string _id = "RMI:Attributes.Greetings:0000000000000000"; public static string id() { return _id; } private static Middsol.CORBA.TypeCode _typeCode = null; public static Middsol.CORBA.TypeCode type() { if ( _typeCode==null ) _typeCode = create_type(); return _typeCode; } public static Middsol.CORBA.TypeCode create_type() { Middsol.CORBA.TypeCode typeCode = Middsol.CORBA._ORB.ORB().create_interface_tc( id(), "Greetings" ); return typeCode; } public static void insert( Middsol.CORBA.Any a, Greetings s ) { a.type( type()); write( a.create_output_stream(), s ); } public static Greetings extract( Middsol.CORBA.Any a ) { return read( a.create_input_stream() ); } public static void write( Middsol.CORBA.portable.OutputStream outpStream, Greetings s ) { outpStream.write_Object ((Middsol.CORBA.Object) s); } public static Greetings read( Middsol.CORBA.portable.InputStream inpStream ) { return narrow ( inpStream.read_Object() ); } public static Greetings narrow( Middsol.CORBA.Object obj ) { if( obj == null ) { return null; } if ( obj is Greetings ) { return (Greetings) obj; } if( obj._is_a( id() ) ) { _GreetingsStub stub = new _GreetingsStub(); stub._set_delegate(((Middsol.CORBA.portable.ObjectImpl)obj)._get_delegate()); return stub; } throw new Middsol.CORBA.BAD_PARAM("Narrow failed"); } } namespace GreetingsPackage { } } //Stubs and Value Default Factories namespace Attributes { public class _GreetingsStub : Middsol.CORBA.portable.ObjectImpl, Greetings { private string[] ids = {"RMI:Attributes.Greetings:0000000000000000"}; public override string[] _ids() { return ids; } public string firstName { set { Middsol.CORBA.portable.InputStream ins = null; while( true ) { try { Middsol.CORBA.portable.OutputStream outs = _request( "_set_firstName", true ); Middsol.CORBA.WStringValueHelper.write( outs, value ); ins = _invoke( outs ); return; } catch( Middsol.CORBA.portable.RemarshalException ) { } catch( Middsol.CORBA.portable.ApplicationException ax ) { String id = ax.getId(); throw new Middsol.CORBA.MARSHAL ( id ); } finally { this._releaseReply( ins ); } } } get { Middsol.CORBA.portable.InputStream ins = null; while( true ) { try { Middsol.CORBA.portable.OutputStream outs = _request( "_get_firstName", true ); ins = _invoke( outs ); return Middsol.CORBA.WStringValueHelper.read( ins ); } catch( Middsol.CORBA.portable.RemarshalException ) { } catch( Middsol.CORBA.portable.ApplicationException ax ) { String id = ax.getId(); throw new Middsol.CORBA.MARSHAL ( id ); } finally { this._releaseReply( ins ); } } } } public bool bar { set { Middsol.CORBA.portable.InputStream ins = null; while( true ) { try { Middsol.CORBA.portable.OutputStream outs = _request( "_set_bar", true ); outs.write_boolean( value ); ins = _invoke( outs ); return; } catch( Middsol.CORBA.portable.RemarshalException ) { } catch( Middsol.CORBA.portable.ApplicationException ax ) { String id = ax.getId(); throw new Middsol.CORBA.MARSHAL ( id ); } finally { this._releaseReply( ins ); } } } get { Middsol.CORBA.portable.InputStream ins = null; while( true ) { try { Middsol.CORBA.portable.OutputStream outs = _request( "_get_bar", true ); ins = _invoke( outs ); return ins.read_boolean(); } catch( Middsol.CORBA.portable.RemarshalException ) { } catch( Middsol.CORBA.portable.ApplicationException ax ) { String id = ax.getId(); throw new Middsol.CORBA.MARSHAL ( id ); } finally { this._releaseReply( ins ); } } } } public bool getBar( ) { Middsol.CORBA.portable.InputStream ins = null; while( true ) { try { Middsol.CORBA.portable.OutputStream outs = _request( "getBar", true ); ins = _invoke( outs ); bool result = ins.read_boolean(); return result; } catch( Middsol.CORBA.portable.RemarshalException ) { } catch( Middsol.CORBA.portable.ApplicationException ax ) { String id = ax.getId(); throw new Middsol.CORBA.MARSHAL ( id ); } finally { this._releaseReply( ins ); } } } } } //POA namespace Attributes { public abstract class GreetingsPOA : Middsol.PortableServer.Servant, GreetingsOperations, Middsol.CORBA.portable.InvokeHandler { private string[] ids = {"RMI:Attributes.Greetings:0000000000000000"}; public override string[] _all_interfaces(Middsol.PortableServer.POA poa, byte[] objectId) { return ids; } public Greetings _this() { return GreetingsHelper.narrow( base._this_object( ) ); } public Greetings _this( Middsol.CORBA.ORB orb ) { return GreetingsHelper.narrow( base._this_object( orb ) ); } virtual public string firstName { set{;} get{return (string)(System.Object) null;} } virtual public bool bar { set{;} get{return (bool)(System.Object) null;} } virtual public bool getBar( ){ return (bool)(System.Object) null ;} public Middsol.CORBA.portable.OutputStream _invoke( string method, Middsol.CORBA.portable.InputStream ins, Middsol.CORBA.portable.ResponseHandler resh ) { Middsol.CORBA.portable.OutputStream outs = null; switch( method ) { case "_set_firstName": { this.firstName = Middsol.CORBA.WStringValueHelper.read( ins ); outs = resh.createReply(); break; } case "_get_firstName": { string value = this.firstName; outs = resh.createReply(); Middsol.CORBA.WStringValueHelper.write( outs, value ); break; } case "_set_bar": { this.bar = ins.read_boolean(); outs = resh.createReply(); break; } case "_get_bar": { bool value = this.bar; outs = resh.createReply(); outs.write_boolean( value ); break; } case "getBar": { bool result = this.getBar( ); outs = resh.createReply(); outs.write_boolean( result ); break; } default: throw new Middsol.CORBA.BAD_OPERATION(); } return outs; } } } //POATie namespace Attributes { public class GreetingsPOATie : GreetingsPOA { public GreetingsPOATie( GreetingsOperations impl ) { this._impl = impl; } public GreetingsPOATie( GreetingsOperations impl, Middsol.PortableServer.POA poa ) { this._impl = impl; this._poa_tie = poa; } public GreetingsOperations _delegate { set { this._impl = value; } get { return this._impl; } } override public Middsol.PortableServer.POA _default_POA() { if(_poa_tie != null) { return _poa_tie; } else { return base._default_POA(); } } override public string firstName { set { ((GreetingsOperations)_impl).firstName = value; } get { return ((GreetingsOperations)_impl).firstName; } } override public bool bar { set { ((GreetingsOperations)_impl).bar = value; } get { return ((GreetingsOperations)_impl).bar; } } override public bool getBar( ) { return ((GreetingsOperations)_impl).getBar( ); } private GreetingsOperations _impl = null; private Middsol.PortableServer.POA _poa_tie = null; } }