Re: [Alephmodular-devel] Some questions on defining CFileType
Status: Pre-Alpha
Brought to you by:
brefin
|
From: Br'fin <br...@ma...> - 2003-01-29 15:49:40
|
The is_a hierarchy was my attempt to link related types. You yourself
commented on it previously as well. For instance, you're trying to
build up the shapes menu and that part of the code shouldn't care what
format the shape file is in. It shouldn't care that it's a M2 file or
an M1 file.
So I'm trying to address that issue. And I also got to wondering, if
you could say something is a map file, shouldn't you also be able to
say whether its a Marathon2 file or not? So far I'm mixed between
trying to come up with a class hierarchy or an attribute based
hierarchy. And with the addition of file type and originator coming
into play, I'm beginning to lean towards an attribute based one.
-Jeremy Parsons
On Wednesday, January 29, 2003, at 10:36 AM, Woody Zenfell, III wrote:
> Now it's my turn to not follow you so well. :)
>
> Perhaps you could illuminate your thinking with a more specific
> example? (e.g., what's in the Marathon2Type interface? What's in the
> MapType interface? Explain about the is_a hierarchy.)
>
> Woody
>
>
> On Wednesday, January 29, 2003, at 09:07 AM, Br'fin wrote:
>
>> On multiply typed elements
>> After a quick bit of thinking, do we have need for types with
>> multiple attributes? And how should that be handled? For instance, a
>> CMarathon2MapType is both a CMapType and a CMarathon2Type. I take
>> this to mean two possible implementations:
>>
>> 1) CMarathon2MapType is a direct subclass of CFileType and implements
>> IMapType and IMarathon2Type interfaces.
>>
>> 2) The is_a hierarchy is maintained in a different way. Like real
>> attributes on the object.
>>
>> I admit, on typing I'm trying to figure out if the class is
>> C<whatever>Type and is essentially a singleton. What is a decent way
>> of referring to one specific type or another?
>>
>> A CFileTypeFactory that offers GetTypeFor("<whatever>") with a hash
>> or dictionary within?
>>
>> -Jeremy Parsons
>>
|