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

Pau Arumi parumi at iua.upf.edu
Thu May 17 07:22:01 PDT 2007


En/na David García Garzón ha escrit:
> 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.
> 

agree. and it was at the wiki before my changes, sorry.
updated examples (commit 10126) and wiki.

p





More information about the clam-devel mailing list