Subclass ExternalStructure or Win32Structure

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Subclass ExternalStructure or Win32Structure

Christoph J. Bachinger
This is more a cosmetic question but I feel a little bit curious about the
subclassing of Structures.
For example DEVMODE is defined under ExternalStructure by Object Arts.
DEVNAMES is defined under ExternalStructure by Ian.

WalicXe Goodies define DEVMODE under Win32Structure what seems reasonable
for me.
Belongs it not to the Win32 API as described in the comment for
Win32Structure.

Whats the philosophie behind that

cjb


Reply | Threaded
Open this post in threaded view
|

Re: Subclass ExternalStructure or Win32Structure

Ian Bartholomew-20
Christoph,

> Whats the philosophie behind that

I was just playing "follow my leader" :-)

Dolphin5 didn't include either DEVMODE or DEVNAMES so I included them as
part of my Printer package.  Both were subclasses of Win32Structure.

Dolphin6 does include DEVMODE so I removed it from the Printer package
and changed the superclass of DEVNAMES to match DEVMODE.  No real
thought behind it on my part.

Looking at the code/comment it appears that the only difference (apart
for the "documentation" issue) is that Win32Structure initializes the
dwSize structure member by default - if it needed.  Neither DEVMODE or
DEVNAMES use dwSize, so it doesn't really seem to matter which
superclass is used.

Ian


Reply | Threaded
Open this post in threaded view
|

Re: Subclass ExternalStructure or Win32Structure

Christoph J. Bachinger
Ian, Andy, Blair,

>> Whats the philosophie behind that
>
> I was just playing "follow my leader" :-)

Looking at a lot of Win32Structure subclasses which have no dwSize structure
member it seems to me, the leader won't follow sometimes himself ;-)

My suggestion would be
ExternalStructure
    COMInterface
    DOUBLE
    ExternalArray
    ExternalInteger
    Float
    .
    .
    Void
    Win32Structure
        All real Win32Structures without Spezialities like COM ..

Anyhow it should be continous.

cjb