// file: filter/filter.h
//	

// make sure definitions are made only once
//
#ifndef __ISIP_FILTER
#define __ISIP_FILTER

// isip include files
//
#ifndef __ISIP_INTEGRAL
#include <integral.h>
#endif

// Filter : a class meant to apply a filter function to signal data
//
class Filter {

  //---------------------------------------------------------------------------
  //
  // protected members
  //
  //---------------------------------------------------------------------------
protected:

  // information about the filter function
  //
  int_4 width_d;

  // the actual filter function
  //
  float_8* data_d;
  
  // debug level
  //
  int_4 debug_level_d;

  logical_1 allocate_cc(int_4 width);
  
  //---------------------------------------------------------------------------
  //
  // public methods
  //
  //---------------------------------------------------------------------------
public:

  // required methods
  //
  char_1* name_cc();
  volatile void error_handler_cc(char_1* method_name, char_1* message);
  logical_1 debug_cc(FILE* fp, char_1* message);
  logical_1 set_debug_cc(int_4 level);  

  // destructor/constructor
  //
  ~Filter();
  Filter();
  Filter(float_8* data, int_4 width);

  // change filter properties
  //
  logical_1 set_cc(float_8* data, int_4 width);
  
  // apply the filter to signal data
  //
  logical_1 apply_cc(float_8* data, int_4 num_samples, int_4 num_channels);
  
  //---------------------------------------------------------------------------
  //
  // private methods
  //
  //---------------------------------------------------------------------------
private:


};

// end of file
//
#endif
