Re: cpp: Wrapping C server implementations.
- From: murrayc t-online de (Murray Cumming)
- To: Murray Cumming <murrayc usa net>
- Cc: Michael Meeks <michael ximian com>, bonobomm-devel <bonobomm-devel lists sourceforge net>, gnome-components-list <gnome-components-list gnome org>
- Subject: Re: cpp: Wrapping C server implementations.
- Date: 18 Apr 2002 22:40:01 +0200
On Thu, 2002-04-18 at 00:02, Murray Cumming wrote:
> On Thu, 2002-04-18 at 00:43, Michael Meeks wrote:
> > On Tue, 2002-04-16 at 14:32, Murray Cumming wrote:
> > > Obviously the C++ equivalent should inherit from the generated
> > > POA_Bonobo::ControlFrame skel, just like a real C++ CORBA server.
> >
> > Why ?
>
> Because a server in C++ should look like a server in C++.
And this allows something very practical: implementation inheritance.
e.g. if our corba interface is this
interface MurrayControl : Bonobo::Control
{
void someMethod();
}
then we can implement it like so, reusing the existing Bonobo::Control
server implementation:
class MurrayControl_impl :
virtual public Bonobo::Control_easyimpl, //wrapped C server.
virtual public POA_MurrayControl //skel for MurrayControl.
{
void SomeMethod(); //implement the method.
//We get the Bonobo::Control methods implemented for free.
}
So I think I've made up my mind - We implement a new server in C++,
delegating to the C-implented server via a C++ client ref. And we'll
worry about performance later if it proves to be a problem.
--
Murray Cumming
murrayc usa net
www.murrayc.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]