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

Function soar_add_callback

Core/SoarKernel/src/callback.cpp:115–143  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

113
114#include <iostream>
115void soar_add_callback(agent* thisAgent,
116 SOAR_CALLBACK_TYPE callback_type,
117 soar_callback_fn fn,
118 soar_callback_event_id eventid,
119 soar_callback_data data,
120 soar_callback_free_fn free_fn,
121 soar_callback_id id)
122{
123
124 soar_callback* cb;
125
126 cb = new soar_callback;
127 cb->function = fn;
128 cb->data = data;
129 cb->eventid = eventid ;
130 cb->free_function = free_fn;
131 cb->id = id;
132
133 push(thisAgent, cb, thisAgent->soar_callbacks[callback_type]);
134
135 //std::cout << soar_callback_enum_to_name(callback_type, false)
136 // << " (" << callback_count(thisAgent, callback_type) << ")";
137 //if (callback_timers.find(callback_type) == callback_timers.end())
138 //{
139 // callback_timers[callback_type] = soar_timer_accumulator();
140 // std::cout << " created timer";
141 //}
142 //std::cout << std::endl;
143}
144
145//void soar_print_detailed_callback_stats()
146//{

Callers 6

setUpMethod · 0.85
add_input_functionFunction · 0.85
add_output_functionFunction · 0.85
InitMethod · 0.85
RegisterWithKernelMethod · 0.85

Calls 1

pushFunction · 0.85

Tested by 1

setUpMethod · 0.68