grub-devel
[Top][All Lists]
Advanced

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

Re: Handlers


From: Neal H. Walfield
Subject: Re: Handlers
Date: Fri, 29 Aug 2008 21:13:06 +0200
User-agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (Shijō) APEL/10.6 Emacs/21.4 (i486-pc-linux-gnu) MULE/5.0 (SAKAKI)

At Fri, 29 Aug 2008 16:46:32 +0200,
Marco Gerards wrote:
> "Neal H. Walfield" <address@hidden> writes:
> 
> > I know know why you call this a handler; it seems to me that it is
> > just a semi-generic list package.  Am I missing something?
> 
> Perhaps.  I can better explain how this can be used and give a small
> example.  GRUB has several types of handlers.  I hope a handler is the
> right word, please correct me if it's not.  Examples of handlers are
> filesystems, terminals, partitioning schemes, commands, etc.  A
> handler usually consists of a struct with function pointers and a
> pointer to the next handler of its kind.

I'd call it a factory.  See:

  http://en.wikipedia.org/wiki/Factory_object

> So it is not a list in the classical sense, it does not contain data.

What about it makes it a list in a non-classical sense?

> > You can find a slighly more flexible and generic implementation here:
> >
> >   
> > http://cvs.savannah.gnu.org/viewvc/hurd-l4/viengoos/list.h?root=hurd&view=markup
> >
> > I've been using that for a while and am quite satisfied with it.
> >
> > Perhaps you'll find it useful.
> 
> It certainly looks good, thanks for the suggestion.  However, I do not
> think we have the same goals.  For example, I focus on size and do not
> need many features.

Sure.  I guess my concern is that lists are useful and it is also
often useful to have an object on multiple lists or to use your struct
trick in other scenarios.  If either of those might be the case, it
might be useful to borrow the list_node idea.

Neal




reply via email to

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