// file: $isip/class/sp/FrontEnd/FrontEndUndefined.h
// version: $Id: FrontEndUndefined.h 9236 2003-06-23 18:12:22Z gao $
//

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

#ifndef ISIP_FRONTEND_BASE
#include <FrontEndBase.h>
#endif

// FrontEndUndefined: a class that is used to define an undefined front end
// object. usually, this class is used for initialization purposes.
//
class FrontEndUndefined : public FrontEndBase {

  //---------------------------------------------------------------------------
  //
  // public constants
  //
  //---------------------------------------------------------------------------
public:

  // define the class name
  //
  static const String CLASS_NAME;

  //----------------------------------------
  //
  // default values and arguments
  //
  //----------------------------------------  

  // define the default value(s) of the class data
  //
  
  //----------------------------------------
  //
  // error codes
  //
  //----------------------------------------  

  static const long ERR = (long)80260;    
  
  //---------------------------------------------------------------------------
  //
  // protected data
  //
  //---------------------------------------------------------------------------

protected:

  //---------------------------------------------------------------------------
  //
  // required public methods
  //
  //---------------------------------------------------------------------------
public:
  
  // static methods:
  //  the diagnose method is not needed
  //
  static const String& name() {
    return CLASS_NAME;
  }
  
  // debug methods
  //  setDebug is inherited from base class
  //
  inline boolean debug(const unichar* msg) const {
    return Error::handle(name(), L"debug",
			 Error::VIRTUAL_PTR, __FILE__, __LINE__);
  }

  // method: destructor
  //
  ~FrontEndUndefined() { }

  // method: default constructor

  FrontEndUndefined() { }

  // assign methods
  //
  
  // i/o methods
  //
  long sofSize() const {
    return Error::handle(name(), L"sofSize",
			 Error::VIRTUAL_PTR, __FILE__, __LINE__);
  }
  
  boolean read(Sof& sof, long tag, const String& name = CLASS_NAME) {
    return Error::handle(CLASS_NAME, L"read",
			 Error::VIRTUAL_PTR, __FILE__, __LINE__);
  }
  
  boolean write(Sof& sof, long tag, const String& name = CLASS_NAME) const {
    return Error::handle(CLASS_NAME, L"write",
			 Error::VIRTUAL_PTR, __FILE__, __LINE__);
  }
  
  boolean readData(Sof& sof, const String& pname,
		   long size, boolean param, boolean nested) {
    return Error::handle(CLASS_NAME, L"readData",
			 Error::VIRTUAL_PTR, __FILE__, __LINE__);
  }

  boolean writeData(Sof& sof,
		    const String& pname = String::getEmptyString()) const {
    return Error::handle(CLASS_NAME, L"writeData",
			 Error::VIRTUAL_PTR, __FILE__, __LINE__);
  }
  
  // equality methods
  //
  boolean eq(const FrontEndUndefined& arg_a) const {
    return Error::handle(CLASS_NAME, L"eq",
			 Error::VIRTUAL_PTR, __FILE__, __LINE__);
  }

  // method: clear
  //
  boolean clear(Integral::CMODE cmode = Integral::DEF_CMODE) {
    return Error::handle(CLASS_NAME, L"clear",
			 Error::VIRTUAL_PTR, __FILE__, __LINE__);
  }
  
  //---------------------------------------------------------------------------
  //
  // class-specific public methods:
  //  set methods
  //
  //---------------------------------------------------------------------------

  // method: setNumChannels
  //
  inline boolean setNumChannels(long arg) {
    return Error::handle(CLASS_NAME, L"setNumChannels",
			 Error::VIRTUAL_PTR, __FILE__, __LINE__);
  }
  
  // method: setCoefName
  //
  inline boolean setCoefName(const String& name) {
    return Error::handle(CLASS_NAME, L"setCoefName",
			 Error::VIRTUAL_PTR, __FILE__, __LINE__);
  }

  // method: setOutputMode
  //
  inline boolean setOutputMode(DATA_MODE arg) {
    return Error::handle(CLASS_NAME, L"setOutputMode",
			 Error::VIRTUAL_PTR, __FILE__, __LINE__);
  }

  // method: setOutputBasename
  //
  inline boolean setOutputBasename(String& basename) {
    return Error::handle(CLASS_NAME, L"setOutpuBas",
			 Error::VIRTUAL_PTR, __FILE__, __LINE__);
  }

  // method: setOutputExtension
  //
  inline boolean setOutputExtension(String& extension) {
    return Error::handle(CLASS_NAME, L"setOutpuExt",
			 Error::VIRTUAL_PTR, __FILE__, __LINE__);
  }
  
  // method: setOutputSuffix
  //
  inline boolean setOutputSuffix(String& suffix) {
    return Error::handle(CLASS_NAME, L"setOutpuSuf",
			 Error::VIRTUAL_PTR, __FILE__, __LINE__);
  }  

  // method: setOutputDirectory
  //
  inline boolean setOutputDirectory(const String& new_dir) {
    return Error::handle(CLASS_NAME, L"setOutpuDir",
			 Error::VIRTUAL_PTR, __FILE__, __LINE__);
  }

  // method: setOutputPreserve
  //
  inline boolean setOutputPreserve(long new_preserve_level) {
    return Error::handle(CLASS_NAME, L"setOutputPreserve",
			 Error::VIRTUAL_PTR, __FILE__, __LINE__);
  }
  
  // method: setOutputType
  //
  inline boolean setOutputType(File::TYPE type) {
     return Error::handle(CLASS_NAME, L"setOutpuType",
			 Error::VIRTUAL_PTR, __FILE__, __LINE__);
  }
  
  
  //---------------------------------------------------------------------------
  //
  // class-specific public methods:
  //  get methods
  //
  //---------------------------------------------------------------------------

  // method: getFrameDuration
  //
  inline float getFrameDuration() const {
    return Error::handle(CLASS_NAME, L"getFrameDuration", Error::VIRTUAL_PTR,
			 __FILE__, __LINE__);
  }

  // method: getNumFrames
  //
  inline long getNumFrames() {
    return Error::handle(CLASS_NAME, L"getNumFrames", Error::VIRTUAL_PTR,
			 __FILE__, __LINE__);
  }  

  // method: getNumFeatures
  //
  inline long getNumFeatures() {
    return Error::handle(CLASS_NAME, L"getNumFeatures", Error::VIRTUAL_PTR,
			 __FILE__, __LINE__);

  }
  
  // method: getNumChannels
  //
  inline long getNumChannels() const {
    return Error::handle(CLASS_NAME, L"getNumChannels",
			 Error::VIRTUAL_PTR, __FILE__, __LINE__);
  }
  
  // method: getInputFlag
  //
  inline boolean getInputFlag() const {
    return Error::handle(CLASS_NAME, L"getInputFlag",
			 Error::VIRTUAL_PTR, __FILE__, __LINE__);
  }
      
  // method: getOutputMode
  //
  inline DATA_MODE getOutputMode() const {
    return (DATA_MODE)Error::handle(CLASS_NAME, L"getOutputMode",
				    Error::VIRTUAL_PTR, __FILE__, __LINE__);
  }

  // method: getOutputBasename
  //
  inline const boolean getOutputBasename(String& basename) const {
    Error::handle(CLASS_NAME, L"getOutputBasename",
		  Error::VIRTUAL_PTR, __FILE__, __LINE__);
    return true;
  }

  // method: getOutputExtension
  //
  inline const boolean getOutputExtension(String& extension) const {
    Error::handle(CLASS_NAME, L"getOutputExtension",
		  Error::VIRTUAL_PTR, __FILE__, __LINE__);
    return true;
  }

  // method: getOutputSuffix
  //
  inline const boolean getOutputSuffix(String& suffix) const {
    Error::handle(CLASS_NAME, L"getOutputSuffix",
		  Error::VIRTUAL_PTR, __FILE__, __LINE__);
    return true;
  }  

  // method: getOutputType
  //
  inline const File::TYPE& getOutputType() const {
    static File::TYPE type;
    Error::handle(CLASS_NAME, L"getOutputType",
		  Error::VIRTUAL_PTR, __FILE__, __LINE__);
    return type;
  }
  
  // method: getID
  //
  const String& getID() const {
    static String str;
    Error::handle(CLASS_NAME, L"getID",
		  Error::VIRTUAL_PTR, __FILE__, __LINE__);
    return str;
  }
  
  // method: isNameInput
  //
 inline boolean isNameInput(const String& name) const {
    return Error::handle(CLASS_NAME, L"isNameInput",
			 Error::VIRTUAL_PTR, __FILE__, __LINE__);
  }
  
  //---------------------------------------------------------------------------
  //
  // class-specific public methods:
  //  core FrontEndBase interface contract methods
  //
  //---------------------------------------------------------------------------

  // method: assign
  //
  boolean assign(const FrontEndBase& arg) {
    return Error::handle(CLASS_NAME, L"assign",
			 Error::VIRTUAL_PTR, __FILE__, __LINE__);
  }

  // method: eq
  //
  boolean eq(const FrontEndBase& arg) const {
    return Error::handle(CLASS_NAME, L"eq",
			 Error::VIRTUAL_PTR, __FILE__, __LINE__);
  }

  // method: className
  //
  inline const String& className() const {
    Error::handle(CLASS_NAME, L"className",
		  Error::VIRTUAL_PTR, __FILE__, __LINE__);
    return String::getEmptyString();
  }

  // method: getVector
  //
  inline boolean getVector(VectorFloat& coeffs, long channel,
			   long frame_index) {
    return Error::handle(CLASS_NAME, L"getVector", Error::VIRTUAL_PTR,
			 __FILE__, __LINE__);
  }
  
  // method: open
  //
  inline boolean open(const Filename& input) {
    return Error::handle(CLASS_NAME, L"open",
			 Error::VIRTUAL_PTR, __FILE__, __LINE__);
  }

  // method: close
  //
  inline boolean close() {
    return Error::handle(CLASS_NAME, L"close",
			 Error::VIRTUAL_PTR, __FILE__, __LINE__);
  }

  // method: init
  //
 inline boolean init(float start_time, float stop_time, int channel) {
    return Error::handle(CLASS_NAME, L"init",
			 Error::VIRTUAL_PTR, __FILE__, __LINE__);
  }
  
  // method: run
  //
  inline boolean run(const Filename& input) {
    return Error::handle(CLASS_NAME, L"run",
			 Error::VIRTUAL_PTR, __FILE__, __LINE__);
  }

  //---------------------------------------------------------------------------
  //
  // class-specific public methods:
  //  other related methods
  //
  //---------------------------------------------------------------------------

  // method: readComponents
  //
  inline boolean readComponents(Sdb& all_recipes) {
    return Error::handle(CLASS_NAME, L"readComponents",
			 Error::VIRTUAL_PTR, __FILE__, __LINE__);
  }

  //---------------------------------------------------------------------------
  //
  // private methods
  //
  //---------------------------------------------------------------------------
private:
};

// end of include file
// 
#endif
