compiler/cpp/src/generate/t_html_generator.cc
/**
 * Recurses through from the provided program and generates a ToC row
 * for each discovered program exactly once by maintaining the list of
 * completed rows in 'finished'
 */
Recurses through from the provided program and generates a ToC row
for each discovered program exactly once by maintaining the list of
completed rows in 'finished'
Recurses through from the provided program and generates a ToC row for each discovered program exactly once by maintaining the list of completed rows in ' finished '
void t_html_generator::generate_program_toc_rows(t_program* tprog,
         std::vector<t_program*>& finished) {
  for (vector<t_program*>::iterator iter = finished.begin();
       iter != finished.end(); iter++) {
    if (tprog->get_path() == (*iter)->get_path()) {
      return;
    }
  }
  finished.push_back(tprog);
  generate_program_toc_row(tprog);
  vector<t_program*> includes = tprog->get_includes();
  for (vector<t_program*>::iterator iter = includes.begin();
       iter != includes.end(); iter++) {
    generate_program_toc_rows(*iter, finished);
  }
}
void t_html_generator :: generate_program_toc_rows ( t_program * tprog , std :: vector < t_program * > & finished ) { for ( vector < t_program * > :: iterator iter = finished . begin ( ) ; iter != finished . end ( ) ; iter ++ ) { if ( tprog -> get_path ( ) == ( * iter ) -> get_path ( ) ) { return ; } } finished . push_back ( tprog ) ; generate_program_toc_row ( tprog ) ; vector < t_program * > includes = tprog -> get_includes ( ) ; for ( vector < t_program * > :: iterator iter = includes . begin ( ) ; iter != includes . end ( ) ; iter ++ ) { generate_program_toc_rows ( * iter , finished ) ; } }
Recurses through from the provided program and generates a ToC row
 for each discovered program exactly once by maintaining the list of
 completed rows in 'finished'
Recurses through from the provided program and generates a ToC row for each discovered program exactly once by maintaining the list of completed rows in ' finished '