rebase / STL set patch
Robert Collins
rbcollins@cygwin.com
Wed Aug 28 04:28:00 GMT 2002
On Wed, 2002-08-28 at 03:10, Jason Tishler wrote:
> Rob,
>
> Just a little status report...
...
> I have implemented the above. If you are interested in the details, see
> the following source tarball:
>
Neato. I've had a look-see. I attach an updated version.
There were a few logic flaws that made it not work for me.
I also as an excercise implemented memory dumping
(RebaseMemoryDump.[h|cc]) and altered main to read into memory and then
dump that to disk (purely as a test).
A bit of feedback... I had to violate the Free/UsedList abstraction
layer to do the memory dumping. This is because they aren't exposing
iterators themselves.
I suggest that you make a RebaseState class that contains both the free
list and the used list as containers:
struct RebaseState {
RebaseState();
~RebaseState();
Dump (RebaseBuilder &);
typedef FreeList set<RebaseFreeListEntry>;
FreeList theFreeList;
typedef UsedList set<RebaseUsedListEntry>;
theUsedList;
}
This uses the STL containers themselves to implement the containers - if
you do need custom container behaviour, then the current two-layer
approach makes more sense (but I'd still implement the RebaseState
class).
Once you ahve RebaseState your RebaseMemoryBuilder constructor becomes:
RebaseMemoryBuilder (RebaseState &);
As I mentioned in my earlier emails though, it actually makes sense to
have RebaseState inherit from RebaseBuilder, and implement the building
interface itself - because it's already decoupled from the storage
mechanism.
> Additionally:
>
> o The conversion from my homegrown container classes to STL
> is proceeding smoothly.
Excellent.
> o When adding (back) the rebase functionality into this
> stand-alone version, I will attempt to use Ralf's rebase
> functions instead of the ones from -limagehlp in order to
> support Me users.
> o After completely this stand-alone version, I will integrate
> with the current setup.exe source and submit a patch.
Cool. There will a few minor things to change at that point to meet the
setup coding conventions. (header file inclusion orders and the like -
nothing major).
Cheers,
Rob
-------------- next part --------------
A non-text attachment was scrubbed...
Name: robsupdate.tar.bz2
Type: application/x-bzip
Size: 231549 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-apps/attachments/20020828/1f1c1e4f/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://cygwin.com/pipermail/cygwin-apps/attachments/20020828/1f1c1e4f/attachment.sig>
More information about the Cygwin-apps
mailing list