cross-platform c++ classes?
Trent Shipley
plug-devel@lists.PLUG.phoenix.az.us
Mon May 21 10:52:39 2001
Let me see if I have this straight.
> -----Original Message-----
> From: plug-devel-admin@lists.PLUG.phoenix.az.us
> [mailto:plug-devel-admin@lists.PLUG.phoenix.az.us]On Behalf Of Lucas
> Vogel
> Sent: Tuesday, May 22, 2001 1:00 PM
> To: 'plug-devel@lists.PLUG.phoenix.az.us'
> Subject: RE: cross-platform c++ classes?
>
>
> 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.
> 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.
> 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?
> 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.