cross-platform c++ classes?

Lucas Vogel plug-devel@lists.PLUG.phoenix.az.us
Mon May 21 11:05:02 2001


> -----Original Message-----
> From: Trent Shipley [mailto:tshipley@symbio-tech.com]
> Sent: Tuesday, May 22, 2001 1:17 PM
> To: plug-devel@lists.PLUG.phoenix.az.us
> Subject: RE: cross-platform c++ classes?
> 
> 
> Let me see if I have this straight.
> 
> >
> >
> > Let me re-ask this question....
> >
> > There exists a somewhat obscure library called the GSD library.
> > It contains
> > hundreds of obscure API calls and is very difficult to 
> understand. What I
> > want to do is create a library of classes that will make 
> the use and abuse
> > of the GSD library much easier to understand and to use.
> 
> 1) You are going to use a library that is already multiplatform.
> 2) The API is too complex.

Correct. The API is very complex.

 
> > Because the GSD library is multiplatform, I want to create 
> a set of "core
> > classes" that are platform-neutral that will compile on the three
> > supported
> > platforms - Linux, Windows and SGI. This set of classes 
> would handle the
> > interfacing to the GSD library and do assorted things.
> 
> 3) So you want a set of tools abstracting the API.
> Z) This sounds like you want a "smart" wrapper for the API.
> Y) C++ should be perfect for this.
> 5) It should be portable (without having to add lots of 
> conditional macro
> statments).
> X) This suggests that you will need to write ANSI compliant 
> code and use
> ANSI capable compilers.

Ok.
 
> > From there
> > I am also
> > going to build a platform-specific subset of objects from 
> those original
> > classes -
> 
> 7) Now that you have a convenient, platform neutral API you 
> want to make it
> platform aware.
> W) Why do you want to do this crazy programmer person?

The fame, the fortune, the women...why else? :)

Actually, there are a lot of reasons for it, primarily because of drawing
and rendering custom graphics, etc. - the documentation for GSD speaks in
two ways, one in terms of X and another in terms of Windows. By having a
platform-specific subset I would be able to implement those
platform-specific aspects separately.

> > that way I still have a platform-neutral codebase that anyone
> > could use in general, with a specific implementation that I 
> need for what
> > I'm doing-which, in this case, would be a windows/COM
> > implementation of the
> > core.
> 


Lucas