[Clam-devel] Bug solved for deleting Out In Ports and Out In Controls
parumi at iua.upf.edu
Wed Jul 16 07:36:20 PDT 2008
On dc, 2008-07-16 at 15:55 +0200, Ferran Orriols wrote:
> Hi Clam,
> I found a bug when you want to delete any port or control. I have
> solved the bug and I have written the tests for each port and control
> and it pass. I have attached the patch with the new tests in
> CLAM/test/UnitTests/ProcessingBaseTests/ProcessingTest.cxx and the
> changes in the next files for solved the problem.
Here goes the commit. Ferran try being more specific on what the patch
does next time.
* Ports/Controls fix on destructor: now, on deletion gets unregistered
from the Processing base registry. This enables increasing/decreasing
the number of ports maintaining connections. (Before you had to do
GetInPorts().Clear(), loosing all connections).
Pair-programmed with Ferran
BTW, adding a line or two of documentation in the Ports/Controls classes
would not hurt. I mean, specifying the semantics of the constructor and
destructor regarding the registration with the Processing. Also, keep us
informed if you decide to write a "dynamic ports" example in the wiki.
More information about the clam-devel