unit testi_c; {This file was generated on 27 Aug 2004 22:29:40 GMT by version 03.03.03.C1.A2} {of the Inprise VisiBroker idl2pas CORBA IDL compiler. } {Please do not edit the contents of this file. You should instead edit and } {recompile the original IDL which was located in the file } {D:\gko\local\simplecorba\delphiserver\laskuri.idl. } {Delphi Pascal unit : testi_c } {derived from IDL module : testi } interface uses CORBA, testi_i; type TiCarCounterHelper = class; TiCarCounterStub = class; TiCarCounterHelper = class class procedure Insert (var _A: CORBA.Any; const _Value : testi_i.iCarCounter); class function Extract(var _A: CORBA.Any) : testi_i.iCarCounter; class function TypeCode : CORBA.TypeCode; class function RepositoryId : string; class function Read (const _Input : CORBA.InputStream) : testi_i.iCarCounter; class procedure Write(const _Output : CORBA.OutputStream; const _Value : testi_i.iCarCounter); class function Narrow(const _Obj : CORBA.CORBAObject; _IsA : Boolean = False) : testi_i.iCarCounter; class function Bind(const _InstanceName : string = ''; _HostName : string = '') : testi_i.iCarCounter; overload; class function Bind(_Options : BindOptions; const _InstanceName : string = ''; _HostName: string = '') : testi_i.iCarCounter; overload; end; TiCarCounterStub = class(CORBA.TCORBAObject, testi_i.iCarCounter) public procedure Inc ; virtual; function Count : Integer; virtual; procedure Clear ; virtual; end; implementation class procedure TiCarCounterHelper.Insert(var _A : CORBA.Any; const _Value : testi_i.iCarCounter); begin _A := Orb.MakeObjectRef( TiCarCounterHelper.TypeCode, _Value as CORBA.CORBAObject); end; class function TiCarCounterHelper.Extract(var _A : CORBA.Any): testi_i.iCarCounter; var _obj : Corba.CorbaObject; begin _obj := Orb.GetObjectRef(_A); Result := TiCarCounterHelper.Narrow(_obj, True); end; class function TiCarCounterHelper.TypeCode : CORBA.TypeCode; begin Result := ORB.CreateInterfaceTC(RepositoryId, 'iCarCounter'); end; class function TiCarCounterHelper.RepositoryId : string; begin Result := 'IDL:testi/iCarCounter:1.0'; end; class function TiCarCounterHelper.Read(const _Input : CORBA.InputStream) : testi_i.iCarCounter; var _Obj : CORBA.CORBAObject; begin _Input.ReadObject(_Obj); Result := Narrow(_Obj, True) end; class procedure TiCarCounterHelper.Write(const _Output : CORBA.OutputStream; const _Value : testi_i.iCarCounter); begin _Output.WriteObject(_Value as CORBA.CORBAObject); end; class function TiCarCounterHelper.Narrow(const _Obj : CORBA.CORBAObject; _IsA : Boolean) : testi_i.iCarCounter; begin Result := nil; if (_Obj = nil) or (_Obj.QueryInterface(testi_i.iCarCounter, Result) = 0) then exit; if _IsA and _Obj._IsA(RepositoryId) then Result := TiCarCounterStub.Create(_Obj); end; class function TiCarCounterHelper.Bind(const _InstanceName : string = ''; _HostName: string = '') : testi_i.iCarCounter; begin Result := Narrow(ORB.bind(RepositoryId, _InstanceName, _HostName), True); end; class function TiCarCounterHelper.Bind(_Options : BindOptions; const _InstanceName : string = ''; _HostName : string = '') : testi_i.iCarCounter; begin Result := Narrow(ORB.bind(RepositoryId, _Options, _InstanceName, _HostName), True); end; procedure TiCarCounterStub.Inc ; var _Output: CORBA.OutputStream; _Input : CORBA.InputStream; begin inherited _CreateRequest('Inc',True, _Output); inherited _Invoke(_Output, _Input); end; function TiCarCounterStub.Count : Integer; var _Output: CORBA.OutputStream; _Input : CORBA.InputStream; begin inherited _CreateRequest('Count',True, _Output); inherited _Invoke(_Output, _Input); _Input.ReadLong(Result); end; procedure TiCarCounterStub.Clear ; var _Output: CORBA.OutputStream; _Input : CORBA.InputStream; begin inherited _CreateRequest('Clear',True, _Output); inherited _Invoke(_Output, _Input); end; initialization end.