This is the mail archive of the cygwin-apps@cygwin.com 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


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

Attachment: robsupdate.tar.bz2
Description: application/bzip

Attachment: signature.asc
Description: This is a digitally signed message part


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