// file: $isip/class/asr/AudioDatabase/AudioDatabase.h
// version: $Id: SymbolGraphDatabase.h 9333 2003-11-06 20:56:37Z alphonso $
//

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

#ifndef ISIP_AUDIO_DATABASE
#include <AudioDatabase.h>
#endif

// SymbolGraphDatabase: a class that facilitates the interface between the
// symbol graph database and another application or class
//
class SymbolGraphDatabase : public AudioDatabase {
  
  //--------------------------------------------------------------------------
  //
  // public constants
  //
  //--------------------------------------------------------------------------
public:
  
  // define the class name
  //
  static const String CLASS_NAME;

  // i/o related constants
  //
  static const String DEF_PARAM;
    
  //---------------------------------------------------------------------------
  //
  // protected data
  //
  //---------------------------------------------------------------------------
protected:

  // member data is inherited from the AudioDatabase class
  
  // declare a static debug level for all class instantiations
  //
  static Integral::DEBUG debug_level_d;
  
  // a static memory manager
  //
  static MemoryManager mgr_d;
  
  //---------------------------------------------------------------------------
  //
  // required public methods
  //
  //---------------------------------------------------------------------------
public:
  
  // method: name
  //
  static const String& name() {
    return CLASS_NAME;
  }
  
  // debug and diagnose methods are inherited from the AudioDatabase class
  //
  
  // method: destructor
  //
  ~SymbolGraphDatabase() {}

  // method: default constructor
  //
  SymbolGraphDatabase();

  // method: copy constructor
  //
  SymbolGraphDatabase(const SymbolGraphDatabase& arg) {
    assign(arg);
  }

  // assign method is inherited from the AudioDatabase class
  //
  
  // i/o methods are inherited from the AudioDatabase class
  //
  
  // equality methods are inherited from the AudioDatabase class
  //

  // method: new
  //
  static void* operator new(size_t arg) {
    return mgr_d.get();
  }

  // method: new[]
  //
  static void* operator new[](size_t arg) {
    return mgr_d.getBlock(arg);
  }

  // method: delete
  //
  static void operator delete(void* arg) {
    mgr_d.release(arg);
  }

  // method: delete[]
  //
  static void operator delete[](void* arg) {
    mgr_d.releaseBlock(arg);
  }

  // method: setGrowSize
  //
  static boolean setGrowSize(long arg) {
    return mgr_d.setGrow(arg);
  }

  // method: clear
  //
  boolean clear(Integral::CMODE cmode = Integral::DEF_CMODE);

  //---------------------------------------------------------------------------
  //
  // class-specific public methods
  //
  //---------------------------------------------------------------------------

  // public methods are inherited from the AudioDatabase class
  //

  //---------------------------------------------------------------------------
  //
  // private methods
  //
  //---------------------------------------------------------------------------
private:

};

//end of include file
//
#endif
