Soar Kernel
9.3.2 08-06-12
|
#include <string>
Go to the source code of this file.
Data Structures | |
struct | callback_struct |
Macros | |
#define | CALLBACK_H |
#define | NUMBER_OF_MONITORABLE_CALLBACKS (NUMBER_OF_CALLBACKS - 2) |
Typedefs | |
typedef struct agent_struct | agent |
typedef char | Bool |
typedef struct cons_struct | cons |
typedef cons | list |
typedef void * | soar_call_data |
typedef struct callback_struct | soar_callback |
typedef void * | soar_callback_data |
typedef int | soar_callback_event_id |
typedef void(* | soar_callback_fn )(agent *, soar_callback_event_id, soar_callback_data, soar_call_data) |
typedef void(* | soar_callback_free_fn )(soar_callback_data) |
typedef const char * | soar_callback_id |
Enumerations | |
enum | SOAR_CALLBACK_TYPE |
#define CALLBACK_H |
Definition at line 327 of file callback.h.
#define NUMBER_OF_MONITORABLE_CALLBACKS (NUMBER_OF_CALLBACKS - 2) |
Definition at line 102 of file callback.h.
Referenced by soar_callback_enum_to_name(), soar_callback_name_to_enum(), soar_list_all_callbacks(), soar_remove_all_monitorable_callbacks(), and soar_test_all_monitorable_callbacks().
typedef struct agent_struct agent |
Definition at line 336 of file callback.h.
typedef char Bool |
Definition at line 330 of file callback.h.
typedef struct cons_struct cons |
Definition at line 343 of file callback.h.
Definition at line 344 of file callback.h.
typedef void* soar_call_data |
Definition at line 333 of file callback.h.
typedef struct callback_struct soar_callback |
typedef void* soar_callback_data |
Definition at line 332 of file callback.h.
typedef int soar_callback_event_id |
Definition at line 334 of file callback.h.
typedef void(* soar_callback_fn)(agent *, soar_callback_event_id, soar_callback_data, soar_call_data) |
Definition at line 338 of file callback.h.
typedef void(* soar_callback_free_fn)(soar_callback_data) |
Definition at line 342 of file callback.h.
typedef const char* soar_callback_id |
Definition at line 331 of file callback.h.
enum SOAR_CALLBACK_TYPE |
Definition at line 48 of file callback.h.
void soar_add_callback | ( | agent * | thisAgent, |
SOAR_CALLBACK_TYPE | , | ||
soar_callback_fn | , | ||
soar_callback_event_id | , | ||
soar_callback_data | , | ||
soar_callback_free_fn | , | ||
soar_callback_id | |||
) |
Definition at line 115 of file callback.cpp.
References callback_struct::data, callback_struct::eventid, callback_struct::free_function, callback_struct::function, callback_struct::id, push(), and agent_struct::soar_callbacks.
Referenced by add_input_function(), add_output_function(), and soar_test_all_monitorable_callbacks().
void soar_callback_data_free_string | ( | soar_callback_data | ) |
Definition at line 155 of file callback.cpp.
const char* soar_callback_enum_to_name | ( | SOAR_CALLBACK_TYPE | , |
Bool | |||
) |
Definition at line 160 of file callback.cpp.
References NUMBER_OF_CALLBACKS, NUMBER_OF_MONITORABLE_CALLBACKS, and soar_callback_names.
Referenced by soar_list_all_callbacks(), and soar_test_all_monitorable_callbacks().
SOAR_CALLBACK_TYPE soar_callback_name_to_enum | ( | char * | , |
Bool | |||
) |
Definition at line 181 of file callback.cpp.
References NO_CALLBACK, NUMBER_OF_CALLBACKS, NUMBER_OF_MONITORABLE_CALLBACKS, and soar_callback_names.
void soar_destroy_callback | ( | soar_callback * | ) |
Definition at line 245 of file callback.cpp.
References callback_struct::data, and callback_struct::free_function.
Referenced by soar_pop_callback(), soar_remove_all_callbacks_for_event(), and soar_remove_callback().
Bool soar_exists_callback | ( | agent * | , |
SOAR_CALLBACK_TYPE | |||
) |
Definition at line 207 of file callback.cpp.
References FALSE, agent_struct::soar_callbacks, and TRUE.
soar_callback* soar_exists_callback_id | ( | agent * | the_agent, |
SOAR_CALLBACK_TYPE | callback_type, | ||
soar_callback_id | id | ||
) |
Definition at line 222 of file callback.cpp.
References cons_struct::first, callback_struct::id, NIL, cons_struct::rest, and agent_struct::soar_callbacks.
Referenced by add_output_function(), remove_output_function(), and update_for_top_state_wme_addition().
void soar_init_callbacks | ( | agent * | ) |
Definition at line 91 of file callback.cpp.
References NIL, NUMBER_OF_CALLBACKS, and agent_struct::soar_callbacks.
Referenced by create_soar_agent().
void soar_invoke_callbacks | ( | agent * | thisAgent, |
SOAR_CALLBACK_TYPE | , | ||
soar_call_data | |||
) |
Definition at line 256 of file callback.cpp.
References AFTER_APPLY_PHASE_CALLBACK, AFTER_DECISION_CYCLE_CALLBACK, AFTER_DECISION_PHASE_CALLBACK, AFTER_ELABORATION_CALLBACK, AFTER_INPUT_PHASE_CALLBACK, AFTER_OUTPUT_PHASE_CALLBACK, AFTER_PREFERENCE_PHASE_CALLBACK, AFTER_PROPOSE_PHASE_CALLBACK, AFTER_WM_PHASE_CALLBACK, BEFORE_APPLY_PHASE_CALLBACK, BEFORE_DECISION_CYCLE_CALLBACK, BEFORE_DECISION_PHASE_CALLBACK, BEFORE_ELABORATION_CALLBACK, BEFORE_INPUT_PHASE_CALLBACK, BEFORE_OUTPUT_PHASE_CALLBACK, BEFORE_PREFERENCE_PHASE_CALLBACK, BEFORE_PROPOSE_PHASE_CALLBACK, BEFORE_WM_PHASE_CALLBACK, agent_struct::callback_timers, agent_struct::current_phase, callback_struct::data, callback_struct::eventid, cons_struct::first, callback_struct::function, INPUT_PHASE_CALLBACK, NIL, cons_struct::rest, agent_struct::soar_callbacks, agent_struct::timers_decision_cycle_phase, agent_struct::timers_input_function_cpu_time, agent_struct::timers_kernel, agent_struct::timers_monitors_cpu_time, agent_struct::timers_phase, and agent_struct::timers_total_kernel_time.
Referenced by add_production_to_rete(), create_instantiation(), create_new_attribute_impasse_for_slot(), create_new_context(), do_buffered_wm_changes(), do_input_cycle(), do_one_top_level_phase(), do_preference_phase(), excise_production_from_rete(), halt_rhs_function_code(), print_string(), reinitialize_soar(), remove_existing_attribute_impasse_for_slot(), remove_existing_context_and_descendents(), remove_wme_list_from_wm(), reteload_node_and_children(), retract_instantiation(), and set_sysparam().
void soar_invoke_first_callback | ( | agent * | thisAgent, |
SOAR_CALLBACK_TYPE | , | ||
soar_call_data | |||
) |
Definition at line 386 of file callback.cpp.
References AFTER_APPLY_PHASE_CALLBACK, AFTER_DECISION_CYCLE_CALLBACK, AFTER_DECISION_PHASE_CALLBACK, AFTER_INPUT_PHASE_CALLBACK, AFTER_OUTPUT_PHASE_CALLBACK, AFTER_PREFERENCE_PHASE_CALLBACK, AFTER_PROPOSE_PHASE_CALLBACK, AFTER_WM_PHASE_CALLBACK, BEFORE_APPLY_PHASE_CALLBACK, BEFORE_DECISION_CYCLE_CALLBACK, BEFORE_DECISION_PHASE_CALLBACK, BEFORE_INPUT_PHASE_CALLBACK, BEFORE_OUTPUT_PHASE_CALLBACK, BEFORE_PREFERENCE_PHASE_CALLBACK, BEFORE_PROPOSE_PHASE_CALLBACK, BEFORE_WM_PHASE_CALLBACK, agent_struct::callback_timers, agent_struct::current_phase, callback_struct::data, callback_struct::eventid, cons_struct::first, callback_struct::function, INPUT_PHASE_CALLBACK, agent_struct::soar_callbacks, agent_struct::timers_decision_cycle_phase, agent_struct::timers_input_function_cpu_time, agent_struct::timers_kernel, agent_struct::timers_monitors_cpu_time, agent_struct::timers_phase, and agent_struct::timers_total_kernel_time.
Definition at line 494 of file callback.cpp.
References FALSE, NUMBER_OF_CALLBACKS, NUMBER_OF_MONITORABLE_CALLBACKS, print(), soar_callback_enum_to_name(), and soar_list_all_callbacks_for_event().
void soar_list_all_callbacks_for_event | ( | agent * | thisAgent, |
SOAR_CALLBACK_TYPE | |||
) |
Definition at line 517 of file callback.cpp.
References cons_struct::first, callback_struct::id, NIL, print(), cons_struct::rest, and agent_struct::soar_callbacks.
Referenced by soar_list_all_callbacks().
void soar_pop_callback | ( | agent * | the_agent, |
SOAR_CALLBACK_TYPE | callback_type | ||
) |
Definition at line 534 of file callback.cpp.
References cons_struct::first, free_cons(), PRINT_CALLBACK, print_string(), cons_struct::rest, agent_struct::soar_callbacks, and soar_destroy_callback().
void soar_print_detailed_callback_stats | ( | ) |
void soar_push_callback | ( | agent * | the_agent, |
SOAR_CALLBACK_TYPE | callback_type, | ||
soar_callback_fn | fn, | ||
soar_callback_data | data, | ||
soar_callback_free_fn | free_fn | ||
) |
void soar_remove_all_callbacks_for_event | ( | agent * | thisAgent, |
SOAR_CALLBACK_TYPE | |||
) |
Definition at line 591 of file callback.cpp.
References cons_struct::first, free_cons(), NIL, cons_struct::rest, agent_struct::soar_callbacks, and soar_destroy_callback().
Referenced by soar_remove_all_monitorable_callbacks().
void soar_remove_all_monitorable_callbacks | ( | agent * | thisAgent | ) |
Definition at line 581 of file callback.cpp.
References NUMBER_OF_MONITORABLE_CALLBACKS, and soar_remove_all_callbacks_for_event().
Referenced by destroy_soar_agent().
void soar_remove_callback | ( | agent * | thisAgent, |
SOAR_CALLBACK_TYPE | , | ||
soar_callback_id | |||
) |
Definition at line 613 of file callback.cpp.
References cons_struct::first, free_cons(), callback_struct::id, NIL, cons_struct::rest, agent_struct::soar_callbacks, and soar_destroy_callback().
Referenced by remove_input_function(), and remove_output_function().
void soar_test_all_monitorable_callbacks | ( | agent * | ) |
Definition at line 658 of file callback.cpp.
References NUMBER_OF_MONITORABLE_CALLBACKS, soar_add_callback(), soar_callback_enum_to_name(), soar_callback_test_callback(), and TRUE.