// file: plist_cstr_0.cc
//

// isip include files
//
#include "path_list.h"
#include "path_list_constants.h"

#include <nbest_node.h>

// method: destructor
//
// arguments: none
//
// return: none
//
// this is the default destructor
//
Path_list::~Path_list() {

  // local variables
  //
  Link_node* pd = (Link_node*)NULL;
  Nbest_node* nnode = (Nbest_node*)NULL;
  
  // remove the path list information
  //
  if (paths_d != (Link_list*)NULL) {
    for (Link_node* node = paths_d->get_head_cc(); node != (Link_node*)NULL;
	 node = pd) {
      pd = node->get_next_cc();
      nnode = (Nbest_node*)(node->get_item_cc());
      delete nnode;
      paths_d->remove_cc(node);
    }
    delete paths_d;
    paths_d = (Link_list*)NULL;
    num_paths_d = (int_4)0;
  }

  // reset frame index
  //
  frame_index_d = (int_4)0;

  // reset max score
  //
  max_score_d = PATH_LIST_DEFAULT_SCORE;
  
  // exit gracefully
  //
}
