#ifndef MyProcessing_hxx #define MyProcessing_hxx #include #include #include #include #include #include #include #include // Those two configuration types could be the ones you choose. // Your own ones or any type already in CLAM. #include "CLAM/Fundamental.hxx" class MyProcessing : public CLAM::Processing { CLAM::InPort mIn; typedef CLAM::NullProcessingConfig Config; public: std::vector array; std::vector result; const char* GetClassName() const { return "MyProcessing"; } MyProcessing(const Config & config=Config()) : mIn("CLAM::Fundamental", this) { Configure( config ); } ~MyProcessing() {} // Configuration to the minimal expression bool ConcreteConfigure(const CLAM::ProcessingConfig&) { return true; // I got proper configuration } const CLAM::ProcessingConfig& GetConfig() const { static Config config; return config; } bool Do() { bool result = Do(mIn.GetData()); array.reserve(450); result.reserve(450); // Tell the ports this is done mIn.Consume(); return result; } bool Do(const CLAM::Fundamental& in ) { for (int i = 0; i < 1; i++) array.push_back(in.GetCandidatesFreq()[0]); for (int i = 0; i < 1; i++) result.push_back(std::sort(array[0])); std::copy(result.begin(), result.end(), std::ostream_iterator(std::cout,"\n")); return true; } }; #endif // MyProcessing_hxx