// file: cd_model.h
//
// this is the header for the cd_model class
//

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

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

#ifndef __ISIP_INTEGRAL_CONSTANTS
#include <integral_constants.h>
#endif

// Model: a class that contains a simple context dependent model
//
class Cd_model {
  
  //---------------------------------------------------------------------------
  //
  // protected data
  //
  //---------------------------------------------------------------------------
protected:
  
  // parameters related to the model
  //
  int_4 num_states_d;            // the number of states of the cd_model  
  int_4* states_ind_d;		 // the state indices of the cd_model
  char_1** phones_d;		 // the triphone of the model
  logical_1 yesphy_d;             // true for physical model
  
  //---------------------------------------------------------------------------
  //
  // 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);
  int_4 size_cc();
  
  // destructors/constructors
  //
  ~Cd_model();  
  Cd_model();
  Cd_model(int_4 num_states);
  Cd_model(Cd_model& cd_model);
  
  // set methods
  //
  logical_1 set_num_states_cc(int_4 num_states);
  logical_1 set_state_ind_cc(int_4 state_ind, int_4 st_pos) {
    states_ind_d[st_pos-1] = state_ind;
    return ISIP_TRUE;
  }
  logical_1 set_phones_cc(char_1** phones);
  logical_1 set_yesphy_cc(logical_1 flag) {
    yesphy_d = flag;
    return ISIP_TRUE;
  }
  
  // get methods
  //
  int_4 get_num_states_cc() {
    return num_states_d;
  }
  int_4 get_states_ind_cc(int_4 st_pos) {
    return states_ind_d[st_pos];
  }
  int_4* get_states_ind_cc() {
    return states_ind_d;
  }
  char_1** get_phones_cc() {
    return phones_d;
  }
  logical_1 get_yesphy_cc() {
    return yesphy_d;
  }
  
  //---------------------------------------------------------------------------
  //
  // private methods
  //
  //---------------------------------------------------------------------------
private:

};

// end of file
// 
#endif
