// file: cdm_set_3.cc
//

// isip include files
//
#include "cd_model.h"
#include "cd_model_constants.h"
//#include <string.h>

// method: set_phones_cc
//
// arguments:
//   char_1** phn: (input) input phones
//
// return : a logical value indicating status
//
// this method sets the phones in the cd_model
//
logical_1 Cd_model::set_phones_cc(char_1** phn_a) {

  // copy the input phone list to the phone list in the cd_model
  // copy a CDM_EMPTY_PHN if certain phone doesn't exist
  //
  for(int i=0;i<CDM_DEFAULT_PH_SIZE;i++) {
    if(phn_a[i] != (char_1*)NULL) {
      strcpy((char*)phones_d[i],(char*)phn_a[i]);
    }
    else {
      strcpy((char*)phones_d[i], (char*)CDM_EMPTY_PHN);
    }
  }
  
  // exist gracefully
  //
  return ISIP_TRUE;
}
