// file: inst_tok_3.cc
//
 
// isip include files
//
#include "instance.h"
#include "instance_constants.h"
 
// method: reset_markers_cc
//
// arguments: none
//  
// return: a logical_1 indicating status
//
// this method resets the marker positions in each token to the end of
// the trace list
//
logical_1 Instance::reset_markers_cc() {

  // if a token list doesn't exist quit
  //
  if (token_list_d == (Link_list*)NULL) {
    return ISIP_TRUE;
  }
  
  // dummy variables
  //
  Token* tok = (Token*)NULL;
  
  // loop over all tokens
  //
  for (Link_node* nd = token_list_d->get_head_cc(); nd != (Link_node*)NULL;
       nd = nd->get_next_cc()) {
    
    // get the token
    //
    tok = (Token*)(nd->get_item_cc());
    
    // reset the marker for this token
    //
    tok->reset_marker_cc();
  }
  
  // exit gracefully
  //
  return ISIP_TRUE;
}
