axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Hawkins <HAWKI...@uk.ibm.com>
Subject RE: Platform specific class
Date Thu, 06 Jan 2005 10:58:28 GMT




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 functions
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 the
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




                                                                           
             "Lilantha                                                     
             Darshana"                                                     
             <ldarshana@edocs.                                          To 
             com>                      "Apache AXIS C Developers List"     
                                       <axis-c-dev@ws.apache.org>          
             05/01/2005 15:08                                           cc 
                                                                           
                                                                   Subject 
             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 (http://apr.apache.org/) for some of impl. ?

regards
-Lilantha


-----Original Message-----
From: John Hawkins [mailto:HAWKINSJ@uk.ibm.com]
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 level).
The architecture layer (Windows, Unix etc.) then has platform specific
implementations of the methods and any overriding of the macros that may be
necessary.
The platform specific layer (WINNT, AIX, HP_UX etc.) then has any more
specific overrides that may be necessary over and above the architecture
layer.

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

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


Thoughts folks?


John Hawkins





             Nadir Amra
             <amra@us.ibm.com>
                                                                        To
             04/01/2005 18:44          "Apache AXIS C Developers List"
                                       <axis-c-dev@ws.apache.org>
                                                                        cc
             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)
Internet: amra@us.ibm.com



John Hawkins <HAWKINSJ@uk.ibm.com>
01/04/2005 12:40 PM
Please respond to
"Apache AXIS C Developers List"


To
axis-c-dev@ws.apache.org
cc

Subject
Transport specific class










Hi Folks,

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

I just implemented a "getErrorMessage" piece of code which should have
gone
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







Mime
View raw message