John Darrington <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED]
web: http://benpfaff.org


_______________________________________________
pspp-dev mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/pspp-dev

Reply via email to