[openbeos] Re: stubgen

  • From: "Michael Phipps" <mphipps1@xxxxxxxxxxxxxxxx>
  • To: openbeos@xxxxxxxxxxxxx
  • Date: Tue, 04 Sep 2001 10:03:28 -0400

Marcus:

Thanks for this. I will check it out. For the C++ folks, this sounds like
something that will help them a great deal!

Several people have mailed me asking how the heck to do this 
(how to get started, basically). 

At the risk of being too ... hands-on, here are some thoughs:

Each Kit is really two pieces:
1) The C++ API
2) The server.

Making the C++ API should not be too tough. It is just a matter of
using the headers from Be, and creating methods that send BMessages
to a server. Maybe some parameter checking, some exception throwing, 
but that is the whole of it, AFAIK.

Making the server is sort of the guts of it. I would start by making an 
application
that responds to every message that the C++ api sends out, dummying out 
responses.
That would allow for debugging and give a framework to work from. Maybe even 
keep those messages and #define them as OPENBEOS_DEBUG or something.
Then I would implement a method or two. Which one all depends on which kit.
The example that I have used in the past is the print server, because we can 
all 
understand it easily. Make the constructor, connect it to a port, etc. Then 
enable
it to take a text message and stream it out to the port. Then maybe work on 
bitmaps
or whatever.

Basically, all we are doing is making BeOS apps that talk directly to the 
drivers (be it 
printer, video, sound, etc) and C++ api's of messages to deal with those 
servers.

Piece of cake. :-) :-D :-)


>Hello,
>
>unfortunately, we are making very slow progress.
>(Correct me if I'm wrong. If you already planned something,
>or did something, please post a smally summary here)
>
>The dumb work of creating *.cpp from the Be header files 
>is also not very entertaining.
>
>But there is a tool that can do this for us.
>
>Download it here:
>
>http://www.radwin.org/michael/projects/stubgen/
>
>It does compile out of the box, simply run make on it.
>
>Creating *.cpp for your xxxKit is as simple as cd'ing into the correct
>directory, and running
>
>stubgen -s -g -a *.h 
>
>Also please have a look on the OpenTracker Coding Guidelines
>
>http://www.opentracker.org/guidelines.html
>
>And then we wanted to use Doxigen, did we?
>
>Regards
>
>Marcus




Other related posts: