[Clam-devel] PATCH: new File class heirarchy

Zach Welch zach-clam-devel at splitstring.com
Tue Apr 10 13:48:27 PDT 2007


On Tuesday 10 April 2007 13:31, Zach Welch wrote:
> > 3. Should there be an EmbeddedNetworkFile?
>
> Absolutely.  In fact, I almost think it should be called NetworkFile,
> because it properly hides the storage mechanism.  I believe it is a poor
> design that exposes the fact that we store our networks with XML; this new
> class hides the implmentation details, and I even included my patch for
> NetworkEditor to re-use it to load/save its networks.

After sending the above message, I realized that my original patch did not 
actually include anything to do with EmbeddedNetworkFile. :)  The attached 
patch shows how the EmbeddedNetworkFile helps begin to abstract the 
MainWindow away from the direct use of XML.  Sorry for the confusion.

This patch also helps underscore the ideas that 1) an intermediate NetworkFile 
base class could be useful (in addition to EmbeddedNetworkFile) and that 2) a 
NetworkStorageErr exception will be needed to completely hide the XML 
implementation details.  This patch works great, and it's a clear win from 
the perspectives of abstraction and encapsulation.  But it's not done.

Cheers,

Zach
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mainwindow-networkfile.patch
Type: text/x-diff
Size: 1221 bytes
Desc: not available
URL: <http://lists.clam-project.org/pipermail/clam-devel-clam-project.org/attachments/20070410/92eb3408/attachment-0003.patch>


More information about the clam-devel mailing list