library/src/events/BP-Events.cc
// simple routine to retrive an event manager by it's name
simple routine to retrive an event manager by it's name
simple routine to retrive an event manager by it ' s name
P_BP_EVENT_MANAGER BP_EventMgrLookupManagerByName(char *mgr_name)
{
	if(!BP_EventMgrLookupManagerKeyedEntryByNameInGHT(mgr_name))
		return NULL;
	char * table_path_actual[10] = {0};
	BP_HASH_TABLE_TRAVERSAL_PATH table_path = (char **) &table_path_actual;
	table_path[0] = "system";
	table_path[1] = "event_managment";
	table_path[2] = mgr_name;
	table_path[3] = "manager";
	table_path[4] = NULL;
	P_BP_HASH_TABLE_KEYED_ENTRY tmp_lookup = BP_HashRegLookupTableByPath(NULL, table_path);
	if(tmp_lookup)
	{
		return (P_BP_EVENT_MANAGER) tmp_lookup->data;
	}
	return NULL;
}
P_BP_EVENT_MANAGER BP_EventMgrLookupManagerByName ( char * mgr_name ) { if ( ! BP_EventMgrLookupManagerKeyedEntryByNameInGHT ( mgr_name ) ) return NULL ; char * table_path_actual [ 10 ] = { 0 } ; BP_HASH_TABLE_TRAVERSAL_PATH table_path = ( char * * ) & table_path_actual ; table_path [ 0 ] = " " ; table_path [ 1 ] = " " ; table_path [ 2 ] = mgr_name ; table_path [ 3 ] = " " ; table_path [ 4 ] = NULL ; P_BP_HASH_TABLE_KEYED_ENTRY tmp_lookup = BP_HashRegLookupTableByPath ( NULL , table_path ) ; if ( tmp_lookup ) { return ( P_BP_EVENT_MANAGER ) tmp_lookup -> data ; } return NULL ; }
simple routine to retrive an event manager by it's name
simple routine to retrive an event manager by it ' s name
// first see if a keyed entry exists for this manager // create a table path on the stack for ease of use // reference to the local stack // set path to /system/event_managment // attempt lookup for /system/event_managment/mgr_name // ensure we have a correct lookup // return the manager (casted) where necessary // return null on failure