This is the mail archive of the
mailing list for the Cygwin project.
Re: rebase / STL set patch
- From: "Robert Collins" <robert dot collins at syncretize dot net>
- To: "Jason Tishler" <jason at tishler dot net>
- Cc: "Cygwin-Apps" <cygwin-apps at cygwin dot com>
- Date: Wed, 3 Jul 2002 08:44:03 +1000
- Subject: Re: rebase / STL set patch
- References: <016401c22014$7cc6e700$1800a8c0@LAPTOP> <20020630134832.GA1904@tishler.net> <023001c22078$d26c9150$1800a8c0@LAPTOP> <20020701123502.GB1904@tishler.net> <009001c220fd$4ff90610$1800a8c0@LAPTOP> <20020702212203.GC1776@tishler.net>
----- Original Message -----
From: "Jason Tishler" <firstname.lastname@example.org>
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?