[Clam-devel] Refactoring: Processig Port|Control Registry doesn't "Publish" anymore now it "Register" ports|controls
Pau Arumi
parumi at iua.upf.edu
Thu Jun 14 07:19:18 PDT 2007
Reviewing last Greg's patch I realized that the API for making
ports-publishers were quite confusing. So I've commited a
refactoring:
* Processig Port|Control Registry doesn't "Publish" anymore now it
"Register" ports|controls
This should not break any code.
Committed revision 10230 and 10231
The longer explanation is:
A method named "Publish" (or PublishSomthig) where used for two
very different things
1) to add a port|control to the Processing Registry --a Registry i
just a collection with gives navigation interface.
2) to make a InControlPublisher actually publish an InControl, etc.
example: mAudioOutPublisher.Publish(innerAudioPort);
The interface 1. was there before 2. But if one "Publish" should
exist, IMO, this is 2.
The changes have been:
* in Processing: InControlPublish( control ) -> InControlRegister(
control), etc.
this interface is used basically for InContol, etc. constructor.
But could also be used by ConcreteProcessing for creating a
collection of controls.
* in *Registry: Publish( control ) -> ProcessingInterface_Register(
control ), etc.
This SomeClassInterface_ is used in other places in Clam. It
means that this method is to be used only by SomeClass. (I know
there is the "friend" keyword but this is not test-friendly)
Last, David and me where thinking alternative names for the
Port|ControlPublisher thing. The better one we came up is: Proxy.
Then the method should be proxy.BeProxyOf( port );
Pau
More information about the clam-devel
mailing list