// file: phn_cstr_2.cc
//

// isip include files
//
#include "phone.h"
#include "phone_constants.h"

// method: constructor
//
// arguments:
//  char_1* name_a: name to set for this phone
//  int_4 nph : (input) number of phones
//  int_4* phones : (input) index of phones
//  Model* model : (input) the pointer to the HMM for this phone
//
// return: none
//
// this is an overloaded constructor
//
Phone::Phone(char_1* name_a, int_4 nph_a, int_4* phones_a, Model* model_a) {

  // initialize name of the phone
  //
  name_d = new char_1[strlen((char*)name_a) + (int_4)1];
  strcpy((char*)name_d, (char*)name_a);

  // set the phone indices
  //
  num_phones_d = nph_a;
  phones_d = new int_4[num_phones_d];
  for (int_4 i = 0; i < num_phones_d; i++) {
    phones_d[i] = phones_a[i];
  }
  
  // set the model pointer
  //
  model_d = model_a;
  active_d = ISIP_FALSE;
  
  // exit gracefully
  //
}
