This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: rebase / STL set patch

----- Original Message -----
From: "Jason Tishler" <>
Sent: Wednesday, July 03, 2002 7:22 AM

> On Mon, Jul 01, 2002 at 10:46:25PM +1000, Robert Collins wrote:
> > Where are we at with the rebase stuff BTW?
> I actually have made some progress recently to two fronts.  I have begun
> to migrate my setup-rebase code to use STL.  So, far I have converted
> free_list to use set instead of my homegrown stuff.  The code compiles
> but I had to leave it (again) before testing.  Once I test it, the
> used_list conversion should go quicker.  After the conversion to STL, I
> will begin to implement the items derived from your feedback.

Cool. I've been thinking about the design some more (about your critiques of
my critiques :}).

How does this approach sound:
Use the Builder pattern to build the in memory representation. Use a second
Builder pattern to build the on-disk representation. This is similar to your
original design, but without the encapsulation issues. It's an improvement
over the memento approach in the same respect, but may take a little more

i.e. we feed a stream into a parser that understands the syntax (you could
review the parser pattern, but I think that is overkill for this). That
parser uses a builder to generate the in memory database - and which other
parts of setup can use if they have specific requirements (i.e. if foo is
not relocatable, they call into the builder). Then at the end the in memory
database is given a Builder and a stream for the builder, and calls into it
to save the file. NB: the two builders will have the same abstract parent.
(say "RebaseBuilder" is a parent of "RebaseIniBuilder" and

What do you think?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]