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 Wed, 05 Jan 2005 11:38:05 GMT




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