[Clam-devel] The simplest processing (Processing base refactoring finished)

David García Garzón dgarcia at iua.upf.edu
Thu May 17 05:24:24 PDT 2007


On Thursday 17 May 2007 14:22:35 Pau Arumi wrote:
> After last commits, this is how it looks the simplest processing
> (at examples/WritingProcessings.cxx)
> Note that ConcreteConfigure is not mandatory to implement.
> But you need to call Configure( Config() ); in the constructor:
>
>
> typedef float MyInputDataType;
> typedef float MyOutputDataType;
>
> class MyProcessing : public CLAM::Processing
> {
> 	CLAM::InPort<MyInputDataType> mIn;
> 	CLAM::OutPort<MyOutputDataType> mOut;
> public:
> 	const char* GetClassName() const { return "MyProcessing"; }
> 	MyProcessing()
>
> 		: mIn("My Input", this)
>
> 		, mOut("My Output", this)
> 	{
> 		Configure( Config() );
> 	}

I would prefer:

MyProcessing(const Config& config = Config())
	: mIn("My Input", this)
	, mOut("My Output", this)
{
	Configure( config );
}

So, the difference when you want to add a configuration is not such a 
difference.





More information about the clam-devel mailing list