// file: tr_debug_0.cc
//

// isip include files
//
#include "trace.h"
#include "trace_constants.h"

// method: debug_cc
//
// arguments:
//  FILE* fp: (input) a open file pointer
//  char_1* message: (input) a message to be displayed
//
// return: a logical_1 flag indicating success
//
logical_1 Trace::debug_cc(FILE *fp_a, char_1* message_a) {
  
  // dump the contents of the class to the file
  //
  fprintf(fp_a, "%s::%s lex_next_d = %p\n", TRACE_CLASS_NAME, message_a,
	  lex_next_d);
  if (lex_next_d != (Lex_node*)NULL) {
    lex_next_d->debug_cc(fp_a, message_a);
  }

  // level and phone index
  //
  fprintf(fp_a, "%s::%s level_d = %ld\n", TRACE_CLASS_NAME, message_a,
	  level_d);
  fprintf(fp_a, "%s::%s state_index_d = %ld\n", TRACE_CLASS_NAME, message_a,
	  state_index_d);
  fprintf(fp_a, "%s::%s phone_index_d = %ld\n", TRACE_CLASS_NAME, message_a,
	  phone_index_d);

  // path history data
  //
  fprintf(fp_a, "%s::%s max_hist_d = %ld\n", TRACE_CLASS_NAME, message_a,
	  max_hist_d);
  fprintf(fp_a, "%s::%s history_d = %p\n", TRACE_CLASS_NAME, message_a,
	  history_d);
  if (history_d != (History*)NULL) {
    history_d->debug_cc(fp_a, message_a);
  }

  // model instance data
  //
  fprintf(fp_a, "%s::%s instance_d = %p\n", TRACE_CLASS_NAME, message_a,
	  instance_d);
  if (instance_d != (Instance*)NULL) {
    instance_d->debug_cc(fp_a, message_a);
  }

  // path data
  //
  fprintf(fp_a, "%s::%s score_d = %.4f\n", TRACE_CLASS_NAME, message_a,
	  score_d);

  // exit gracefully
  //
  return ISIP_TRUE;
}
