File: MyProcessing.hxx

package info (click to toggle)
clam 1.4.0-5.1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 17,780 kB
  • sloc: cpp: 92,499; python: 9,721; ansic: 1,602; xml: 444; sh: 239; makefile: 153; perl: 54; asm: 15
file content (38 lines) | stat: -rw-r--r-- 777 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#ifndef MyProcessing_hxx
#define MyProcessing_hxx

#include <CLAM/InPort.hxx>
#include <CLAM/OutPort.hxx>
#include <CLAM/Processing.hxx>
#include <CLAM/Spectrum.hxx>

class MyProcessing : public CLAM::Processing
{
	CLAM::InPort<CLAM::Spectrum> mIn;
	CLAM::OutPort<CLAM::Spectrum> mOut;
public:
	const char* GetClassName() const { return "MyProcessing"; }
	MyProcessing(const Config& config = Config()) 
		: mIn("My Input", this)
		, mOut("My Output", this) 
	{
		Configure( config );
	}
 
	bool Do()
	{
		bool result = Do(mIn.GetData(), mOut.GetData()); 
		// Tell the ports this is done
		mIn.Consume();
		mOut.Produce();
		return result;
	}

	bool Do(const CLAM::Spectrum& in, CLAM::Spectrum& out)
	{
		// Your implementation
		return true;
	}
};

#endif // MyProcessing_hxx