| 5315 | } |
| 5316 | |
| 5317 | void smem_visualize_lti(agent* thisAgent, smem_lti_id lti_id, unsigned int depth, std::string* return_val) |
| 5318 | { |
| 5319 | // buffer |
| 5320 | std::string return_val2; |
| 5321 | |
| 5322 | soar_module::sqlite_statement* expand_q = thisAgent->smem_stmts->web_expand; |
| 5323 | |
| 5324 | uint64_t child_counter; |
| 5325 | |
| 5326 | std::string temp_str; |
| 5327 | std::string temp_str2; |
| 5328 | int64_t temp_int; |
| 5329 | double temp_double; |
| 5330 | |
| 5331 | std::queue<smem_vis_lti*> bfs; |
| 5332 | smem_vis_lti* new_lti; |
| 5333 | smem_vis_lti* parent_lti; |
| 5334 | |
| 5335 | std::map< smem_lti_id, smem_vis_lti* > close_list; |
| 5336 | std::map< smem_lti_id, smem_vis_lti* >::iterator cl_p; |
| 5337 | |
| 5338 | // header |
| 5339 | return_val->append("digraph smem_lti {"); |
| 5340 | return_val->append("\n"); |
| 5341 | |
| 5342 | // root |
| 5343 | { |
| 5344 | new_lti = new smem_vis_lti; |
| 5345 | new_lti->lti_id = lti_id; |
| 5346 | new_lti->level = 0; |
| 5347 | |
| 5348 | // fake former linkage |
| 5349 | { |
| 5350 | soar_module::sqlite_statement* lti_q = thisAgent->smem_stmts->lti_letter_num; |
| 5351 | |
| 5352 | // get just this lti |
| 5353 | lti_q->bind_int(1, lti_id); |
| 5354 | lti_q->execute(); |
| 5355 | |
| 5356 | // soar_letter |
| 5357 | new_lti->lti_name.push_back(static_cast<char>(lti_q->column_int(0))); |
| 5358 | |
| 5359 | // number |
| 5360 | temp_int = lti_q->column_int(1); |
| 5361 | to_string(temp_int, temp_str); |
| 5362 | new_lti->lti_name.append(temp_str); |
| 5363 | |
| 5364 | // done with lookup |
| 5365 | lti_q->reinitialize(); |
| 5366 | } |
| 5367 | |
| 5368 | bfs.push(new_lti); |
| 5369 | close_list.insert(std::make_pair(lti_id, new_lti)); |
| 5370 | |
| 5371 | new_lti = NULL; |
| 5372 | } |
| 5373 | |
| 5374 | // optionally depth-limited breadth-first-search of children |
no test coverage detected