[openbeosnetteam] Re: Dial-Up

  • From: "Axel Dörfler" <axeld@xxxxxxxxxxxxxxxx>
  • To: openbeosnetteam@xxxxxxxxxxxxx
  • Date: Thu, 10 Apr 2003 16:12:48 +0200 CEST

"Waldemar Kornewald" <Waldemar.Kornewald@xxxxxx> wrote:
> > > - about a Object Oriented (C++) stack design, but as BeOS kernel 
> > > (and
> > > OpenBeOS 's one most probably) linker don't support that well C++
> > > , we
> > > code our stack in C++ but C only.
> > If you prefer C++, use C++. We don't have exceptions, but almost
> > anything else will work. I would just prefer the module APIs to be 
> > C
> > only, not to force anybody to use C++ if he doesn't want to.
> I would like to use C++ for everything inside the kernel if possible.
> The PPP module and the PPPoE module could be C++. :)

Sure, like everything else, too.

> I would like that very much.
> But, the need of wrappers around C++ modules when writing the 
> protocols
> because the modules are in C is not cool.
> Maybe we could make C++ the default protocol and add a C++->C wrapper 
> module
> that loads the C modules. The core module would load C++ modules and 
> the C++
> wrapper module that returns all C modules. This would save some calls 
> and
> make C++ modules even easier.
> As an alternative we could make a wrapper that can be integrated into 
> the
> project as an additional source file and a small macro call with the 
> C++
> class as the argument:
> WRAP_CPP_NET_MODULE(mycppmod);

No, that's definitely not an option. I would rather provide a protocol 
base class which implements the C module API. Then you could just 
inherit from that one, and doesn't have to care about this too much 
anymore.

Adios...
   Axel.


Other related posts: