MCPcopy Create free account
hub / github.com/SoarGroup/Soar / remove_output_function

Function remove_output_function

Core/SoarKernel/src/io_soar.cpp:115–142  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

113}
114
115void remove_output_function(agent* thisAgent, const char* name)
116{
117 soar_callback* cb;
118 output_link* ol;
119
120 /* Remove indexing structures ... */
121
122 cb = soar_exists_callback_id(thisAgent, OUTPUT_PHASE_CALLBACK, name);
123 if (!cb)
124 {
125 return;
126 }
127
128 for (ol = thisAgent->existing_output_links; ol != NIL; ol = ol->next)
129 {
130 if (ol->cb == cb)
131 {
132 /* Remove ol entry */
133 ol->link_wme->output_link = NULL;
134 wme_remove_ref(thisAgent, ol->link_wme);
135 remove_from_dll(thisAgent->existing_output_links, ol, next, prev);
136 free_with_pool(&(thisAgent->output_link_pool), ol);
137 break;
138 }
139 }
140
141 soar_remove_callback(thisAgent, OUTPUT_PHASE_CALLBACK, name);
142}
143
144/* ====================================================================
145 Input Routines

Callers

nothing calls this directly

Calls 4

soar_exists_callback_idFunction · 0.85
wme_remove_refFunction · 0.85
free_with_poolFunction · 0.85
soar_remove_callbackFunction · 0.85

Tested by

no test coverage detected