// file: $isip/class/search/StackSearch/ssrch_13.cc // version: $Id: ssrch_13.cc 9144 2003-05-16 21:59:27Z jelinek $ // // isip include files // #include "StackSearch.h" // method: getTraces // // arguments: // DoubleLinkedList& trace_list: (output) traces at particular level // int32 level: (input) level of the traces to output // // return: logical error status // // returns all traces active at particular level // bool8 StackSearch::getTraces(DoubleLinkedList& trace_list_a, int32 level_a) { // loop over all traces at the top level and put them // in the top_trace_list_a list // Trace* curr_trace = NULL; while (trace_lists_d(level_a).removeFirst(curr_trace)) { trace_list_a.insertLast(curr_trace); } if (level_a == 0) { // get also valid hypotheses // while (!valid_hyps_d.isEmpty()) { curr_trace = valid_hyps_d.pop(); trace_list_a.insertLast(curr_trace); } } // make sure there is at least one trace in the list // if ((trace_list_a.length() < 1)) { // exit ungracefully // return false; } else { // exit gracefully // return true; } } // method: setTraces // // arguments: // DoubleLinkedList& trace_list: (input) traces to put on certain level // int32 level: (input) level to put the traces on // // return: logical error status // // set the list of traces to be on the top level // bool8 StackSearch::setTraces( DoubleLinkedList& trace_list_a, int32 level_a) { // make sure there is at least one trace in the list // Trace* curr_trace = NULL; while (trace_list_a.removeFirst(curr_trace)) { trace_lists_d(level_a).insertLast(curr_trace); } // exit gracefully // return true; }