[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[TSVN] Another refactoring opportunity?

From: Will Dean <svn_at_indcomp.co.uk>
Date: 2005-01-04 17:15:54 CET

Guys,

The TSVN codebase currently contains approximately 25 copies of a set of
wizard-generated code (plus several message map entries, class members,
etc), which deals with assigning an icon to a dialog box when it's used at
the main application of a window (as most of the dialogs in TSVN are).

It's a boring set of code, familiar to anyone who's written an MFC
dialog-based application.

I am instinctively offended by boring code being repeated 25 times in an
application, and have played with a way of removing it. This is to create a
dialog class (which contains this code) and then derive all the other
dialog classes from it. There is an additional complication that dialogs
in TSVN can derive either from CDialog, or from CResizableDialog - so I
made my base class a template, which takes the type of the base as a parameter.

To allow some discussion of whether people think this is a good idea or
not, I have just committed this into rev 2310.

I won't change any more files until there's been some discussion of whether
this seems to be a sensible thing to do. I appreciate that it might be
viewed as worthless obfuscation...

Thanks,

Will

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: dev-help@tortoisesvn.tigris.org
Received on Tue Jan 4 17:16:32 2005

This is an archived mail posted to the TortoiseSVN Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.