pdf-devel
[Top][All Lists]
Advanced

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

Re: [pdf-devel] Polymorphism on GNU Pdf


From: gerel
Subject: Re: [pdf-devel] Polymorphism on GNU Pdf
Date: Sat, 04 Oct 2008 12:19:05 -0700 (PDT)

 > Date: Sat, 04 Oct 2008 20:52:37 +0200
 > From: Juan Pedro Bolivar Puente <address@hidden>
 > 
 > There are certainly some polymorphic types on GNU Pdf, the most clear
 > example are stream filters and stream backends. However, although it is
 > true that we must handle with C limitations on this point, I think that
 > we are not doing it on the right way.
 > 
 > I mean, it is cool to have a filter interface that we can handle
 > homogenously, but it is not so cool if we need a
 > pdf_stream_install_filter that gets a fixed enum to identify the
 > filter... what if the library client wants to define a new kind of
 > filter? He can't... Even worse, stream backends have a defined interface
 > but we are using a switch () {} on every stream function to dispatch the
 > correct one instead of using function pointers...
 > 
 > 
 > My proposal is to define a clear metodology for polymorphic types that
 > makes the gnupdf API more consistent and that causes less coupling among
 > modules. My purposed method is the one used by GNUlib data structures:
 > 

I understand that you want to make the filter structure public so the user
can define it's own filters, now, is that really useful in our context ?.
Remember we're talking about the PDF standard. If there is a new filter in the
PDF reference WE are going to implement it. :-)

My 2 cents

-gerel




reply via email to

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