On Thursday 24 May 2007 08:34:43 pm Chris Frey wrote: > If my spidey sense is tingling correctly, I suspect you are refactoring > to make a Record base class that all other record classes are derived > from.
Yup, seemed to be the easiest way to keep things simple and reduce the amount of duplicated methods. > > I have purposely avoided doing this, since I want to make sure that > all record classes are dead simple, and STL container safe. I've done > large hierarchies of classes before, and making sure that the copy > constructors and all the operator=() functions are correct is a bit of > work, so I had intended to keep the record classes themselves > hierarchy-less. > > The hierarchy I've done before had virtual operator=() functions, which > is probably most of the reason why it was so much work (you could > copy any object correctly, even through a base pointer). But I still > favour simple record classes, just to make them absolutely bulletproof > from the application's perspective. They should be able to toss > these things around with no fear. Okay. Not the way I would have gone (obviously :)) but I have no problem following your lead. When I had indicated that was my direction and heard nothing back I figured it was a go. > > This doesn't prevent us from making helper classes or helper > functions, or even helper templates (although that's less than > ideal, since that just hides the code duplication). > > All such helpers would be hidden inside the library, and not accessible > to the application. Easily enough done with class hierarchy. There are enough member functions being duplicated and what looked liked a bunch of opportunities for refactoring. > > I'll commit my file-split work soon, and hopefully you'll see what > I mean. If you've done a lot of work on these already, I apologise > for not speaking sooner. I see you're keen on sending patches > (excellent!), so I'll try to post to the list more frequently as I work on > things. > > From your previous emails, you have a bunch of record parsing classes > waiting to send, and I haven't been working on any of that side lately, > so we're at least not duplicating work there. Ha. Good enough. You might want to figure out a way we can better indicate what is being worked on, or needs to be done next. I've spend a couple hours on this so its not a big deal now - but I'm glad you mentioned something before the 3 day holiday down here this weekend ;) P.S. I think you should apply my <class Record> to <class RecordT> patch anyway to make the code a bit more consistent. > > Thanks, > - Chris ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Barry-devel mailing list Barry-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/barry-devel