axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Hawkins <>
Subject RE: Platform specific class
Date Mon, 10 Jan 2005 17:27:21 GMT
I agree, moving to APR now would not be a good idea for us either.

and, if it aint broke , don't fix it. So, changing to an Object model is 
probably not a good timing either. We should  delay to post 1.5

I wasn't suggesting changing all macros to functions (although they could 
all be done using fnuctions of course). Just some of the major ones would 
seem sensible.

I suggest we postpone discussions until later on :-)

John Hawkins

Nadir Amra <> 
06/01/2005 21:10
Please respond to
"Apache AXIS C Developers List"

"Apache AXIS C Developers List" <>

RE: Platform specific class

Two things.

First, the use of APR should be delayed until 1.6 or beyond because we 
have too many things we need to get done for 1.5, at least from my 
perspective. Major hurdle is I want to overcome is making code locale 
sensitive.  Adding APR to the mix would be too much to handle.

Second, I do not think we can get rid of the platform header files that 
includes defines and typedefs, etc.  As far as making a platform class 
with methods to say load library, get locale, only concern is if 
C code needed to access any platform-specific APIs.  I know the AXIS 
engine is purely C++, and if we can guarantee that C stubs do not need 
access, then I would say yes going to the class implementation, although I 

am not sure it would not be overkill.

I do not mind in 1.5 changing macros to functions if you feel it is 
necessary.  For example:

In PlatformAutoSense.hpp, the APIs the platforms would need to implement 
would be listed:

extern "C" platform_loadlibray( ...)
extern "C" platform_unloadlibrary(...)

And the implementation of the code would be in the separate files for each 

platform, for example,


and in the ANT build, we can choose what platform cpp file to include 
based on platform.

In addition, this could be a separate DLL so that we do not have to 
include in all DLLs used.

Or, we can revisit this in a future release :-) and leave as-is.   There 
is not that much in the files at this point in time.

John Hawkins <> 
01/06/2005 04:58 AM
Please respond to
"Apache AXIS C Developers List"

"Apache AXIS C Developers List" <>

RE: Platform specific class

Hi Lilantha,

Good point - I'd forgotten about that project !

Yes, the library routines there are exactly what we are talking about here
e.g. they have a getErrorMessage equivelant and most of the other 
that we have defined in our platform objects now.
I can't see the equivelant of our ->
#define PLATFORM_STRTOASC( x ) ( x )
#define PLATFORM_ASCTOSTR( x ) ( x )

in it but I might have missed it.

If we were to use this library. We might still need some level of
"Platform" object because our platform stuff has filenames in it (but this
is minor and is more architecture dependent than OS dependent between Win
and non-windows) and it might even be solved I perhaaps just didn't see 
routine in the APR ?

I'm worried about using APR because it's quite big and they say they have
compiled it on windows and Unix. This may have ramifications for us as we
support OS400  - Nadir - thoughts please?

It would be a big move to use APR and it might be better to do it slowly -
if at all depending on the OS400 issue. If OS400 has issues with APR (or
indeed other architectures/platforms) then we could have a compromise (not
a great one but a way forward) of moving to the platform model as
previously described but making the base class use APR. That way any
functions we had issues with or architectures/platforms that could not be
supported using APR could overwrite the methods.

It's not great because it means that for every APR function that does not
work on all platforms we have to wrapper.

Thoughts please folks?

John Hawkins

             <ldarshana@edocs.                                          To 

             com>                      "Apache AXIS C Developers List" 
             05/01/2005 15:08                                           cc 


             Please respond to         RE: Platform specific class 
              "Apache AXIS C 
             Developers List" 

+1 for a Bridge pattern to support. PAL - Platform Abstraction Layer.
Can we think of using APR ( for some of impl. ?


-----Original Message-----
From: John Hawkins []
Sent: Wednesday, January 05, 2005 6:38 AM
To: Apache AXIS C Developers List
Subject: Re: Platform specific class

I was thinking of something like the following:

(See attached file: Platform hierarchy.jpeg)

As you can see the IPlatform interface has base implementations for macros
and pure virtual methods only. This makes it really clear what the
platforms have to implement (with appropriate documentation at this 
The architecture layer (Windows, Unix etc.) then has platform specific
implementations of the methods and any overriding of the macros that may 
The platform specific layer (WINNT, AIX, HP_UX etc.) then has any more
specific overrides that may be necessary over and above the architecture

The Platform factory is the key class it is set out something like this
(Pseudo) ->

class Platform
      static IPlatform platform;
#ifdef WIN32
      platform = Win32Platform
      * returns the specific instance of Platform
      static IPlatform getplatform();

Thoughts folks?

John Hawkins

             Nadir Amra
             04/01/2005 18:44          "Apache AXIS C Developers List"
             Please respond to
              "Apache AXIS C                                       Subject
             Developers List"          Re: Transport specific class

I agree, and was thinking of doing that....although do we want a
PlatformServices class or just individual APIs?

Nadir K. Amra
e-Business Technologies - IBM eServer i5/OS
IBM Rochester, MN,  (Tel. 507-253-0645, t/l 553-0645)

John Hawkins <>
01/04/2005 12:40 PM
Please respond to
"Apache AXIS C Developers List"


Transport specific class

Hi Folks,

I've just been putting some error information into transport and realised
few things. (I'm going to start another thread re other issue.)

I just implemented a "getErrorMessage" piece of code which should have
into the platform specifics but it was quite chunky and did not sit easily
with being a macro.

The Platform specific files are not classes - this surprised me - would it
be better to have a platform interface that the specific classes overrode
with their implementation? I understand that the macros are probably fine
for most things but if we had a platform class it would be more explicit
what each method had to achieve. These methods could also return values
more explicitly?

John Hawkins

View raw message