34 t_comin_callback_function fct_ptr) {
37 const int entry_point_slot =
static_cast<int>(entry_point) - 1;
39 auto& callback_list = comin::state.comin_callback_list_context;
41 t_comin_callback_item item;
43 item.entrypoint_id = entry_point;
48 comin_error_set(COMIN_ERROR_CALLBACK_REGISTER_OUTSIDE_PRIMARYCONSTRUCTOR);
54 auto& ep_callback_list = callback_list[entry_point_slot];
55 const bool is_present =
56 std::any_of(ep_callback_list.cbegin(), ep_callback_list.cend(),
57 [&](
const t_comin_callback_item& existing_item) {
58 return existing_item.plugin_id == item.plugin_id;
62 comin::logging::message(12,
"WARNING: Callback for plugin ID ",
64 " already registered at entry point '", ep_name,
65 "' (ep: ", entry_point,
")!");
69 ep_callback_list.push_back(item);
74 comin::logging::message(
75 0,
" registration for '", ep_name,
"' (ep: ", entry_point,
76 ") associated for 3rd party plugin ", plugin_name,
" successful.");
92 const t_comin_entry_point entry_point =
93 static_cast<t_comin_entry_point
>(entry_point_id);
101 comin::logging::message(12,
" CONTEXT ", ep_name);
104 auto& callback_list = state.comin_callback_list_context;
106 auto& ep_callback_list = callback_list[entry_point - 1];
108 if (ep_callback_list.empty()) {
109 comin::logging::message(12,
" no calls associated with entry point '",
110 ep_name,
"' (ep: ", entry_point,
").");
115 for (
const auto& cl : ep_callback_list) {
121 comin::logging::message(0,
" current ep '", ep_name,
122 "' (ep: ", cl.entrypoint_id,
123 ") for library: ", plugin_name);
135 state.current_ep = entry_point;
138 state.current_domain_id = domain_id;
140 if (entry_point == EP_DESTRUCTOR)
141 state.current_domain_id = DOMAIN_UNDEFINED;