// file: tr_ll_debug_0.cc
//
 
// isip include files
//
#include "train_link_list.h"
#include "train_link_list_constants.h"

// method: debug_cc
//
// arguments:
//  FILE* fp: (input) file pointer used for output
//  char_1* message: (input) a message concatenated to each debug message
//
// return: a logical_1 value indicating status
//
// this method displays the values of all internal data
//
logical_1 Train_Link_list::debug_cc(FILE* fp_a, char_1* message_a) {

  // dump link pointers
  //
  fprintf(fp_a, "%s::%s: head_d = %p\n", TRAIN_LL_CLASS_NAME, message_a, head_d);
  fprintf(fp_a, "%s::%s: curr_d = %p\n", TRAIN_LL_CLASS_NAME, message_a, curr_d);

  // dump the data of the links
  //
  Train_Link_node* node = head_d;
  while (node != (Train_Link_node*)NULL) {
    fprintf(fp_a, "%s::%s: node = %p\n", TRAIN_LL_CLASS_NAME, message_a, node);
    node->debug_cc(fp_a, message_a);
    node = node->get_next_cc();
  }

  // exit gracefully
  //
  return ISIP_TRUE;
}
