library/src/datastructures/BP-HashTable.cc
// Checks if the entry is a "special" type such as a class pointer.
Checks if the entry is a "special" type such as a class pointer.
Checks if the entry is a " special " type such as a class pointer .
BP_ERROR_T ht_entry_is_special_type(P_BP_HASH_TABLE_KEYED_ENTRY entry)
{
	if(!entry)
		return ERR_FAILURE;
	switch(entry->type)
	{
		case BP_HASH_TABLE_KEYED_ENTRY_TYPE_CPP_CLASS_POINTER_EXTERNALLY_MANAGED:
		case BP_HASH_TABLE_KEYED_ENTRY_TYPE_MESSAGE_TO_WORKER:
		case BP_HASH_TABLE_KEYED_ENTRY_TYPE_MESSAGE_FROM_WORKER:
		case BP_HASH_TABLE_KEYED_ENTRY_TYPE_EVENT_UNPROCESSED:
		case BP_HASH_TABLE_KEYED_ENTRY_TYPE_EVENT_PROCESSED:
			return ERR_SUCCESS;
			break;
		default:
			break;
	}
	return ERR_FAILURE;
}
BP_ERROR_T ht_entry_is_special_type ( P_BP_HASH_TABLE_KEYED_ENTRY entry ) { if ( ! entry ) return ERR_FAILURE ; switch ( entry -> type ) { case BP_HASH_TABLE_KEYED_ENTRY_TYPE_CPP_CLASS_POINTER_EXTERNALLY_MANAGED : case BP_HASH_TABLE_KEYED_ENTRY_TYPE_MESSAGE_TO_WORKER : case BP_HASH_TABLE_KEYED_ENTRY_TYPE_MESSAGE_FROM_WORKER : case BP_HASH_TABLE_KEYED_ENTRY_TYPE_EVENT_UNPROCESSED : case BP_HASH_TABLE_KEYED_ENTRY_TYPE_EVENT_PROCESSED : return ERR_SUCCESS ; break ; default : break ; } return ERR_FAILURE ; }
Checks if the entry is a "special" type such as a class pointer.
Checks if the entry is a " special " type such as a class pointer .
// ensure we have an entry pointer // switch on the entry type // if the type matches any of our buffer types, indicate it here // return indicating failure