pspp-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [patch #5209] Proposed casefile changes


From: Ben Pfaff
Subject: Re: [patch #5209] Proposed casefile changes
Date: Thu, 29 Jun 2006 11:02:36 -0700
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/21.4 (gnu/linux)

John Darrington <address@hidden> writes:

> On Wed, Jun 28, 2006 at 11:15:33AM -0700, Ben Pfaff wrote:
>      
>      Please create a "struct casefile_class" and move the function pointers
>      in "struct casefile" into it.  This better abstracts the casefile
>      implementations and saves time and memory because only a single
>      pointer needs to be set when creating a casefile.  (This is like the
>      way the output drivers work.)
>
> OK.  It's not quite that simple, because different subclasses will
> have different  implementations.  But I can do that.

I'm not quite sure what you mean.  Can you elaborate?  (Perhaps
this will clear up your answer to the following comment as well.)

>      Currently the patch hard-codes the places that use a casefile to use a
>      fastfile.  They should really, in most cases at all, produce the kind
>      of file that the UI wants.  We need some mechanism for that.  Perhaps
>      procedure.c (or the UI?) should supply a function that creates and
>      returns the "preferred" kind of casefile.
>
> I believe this is what the textbooks call an "abstract factory".  It
> may be a good idea to have, but it can be done as a seperate exercise
> I think.

Yes, it can, and if you want to wait until we really know what we
want that's fine with me.

(I'm aware of the various "Design Patterns" definitions but I
don't usually think in terms of them, for what it's worth.)

> Did you have any thoughts on my questions regarding the sleep,
> to_disk, in_core and read_mode functions?

I don't think I saw the questions.  Where can I find them?
-- 
Ben Pfaff 
email: address@hidden
web: http://benpfaff.org




reply via email to

[Prev in Thread] Current Thread [Next in Thread]