<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
</head>
<body bgcolor="#ffffff" text="#000000">
Hi,<br>
<br>
I would very much like to take out duplicate code, a good example of
what I mean is:<br>
<br>
<img alt="" src="cid:part1.03000009.07030108@barcelonamedia.org"
 height="333" width="856"><br>
<br>
the only difference is the container, the rest code is the same.<br>
<br>
So for instance the registerports function will boil down to 1 function:<br>
<br>
<img alt="" src="cid:part2.06060909.05080506@barcelonamedia.org"
 height="677" width="818"><br>
<br>
Same goes for all the explicit loops, I would prefer std::for_each (or
BOOST_FOREACH) for that matter:<br>
<br>
<img alt="" src="cid:part3.04060700.08050606@barcelonamedia.org"
 height="71" width="623"><br>
<br>
as for me this separates the loop (not interesting) from the blanking
code; but it can be argued that this last remark is trivial<br>
<br>
My question then is<br>
- is removing duplicate code by adding template code like the above
liked as refactoring?<br>
- is std::for_each liked?<br>
<br>
Dirk<br>
<br>
<br>
<br>
<br>
<br>
</body>
</html>