Example #1
0
PMETHOD objrtn findGE(object self, ifun cfun, object key, object *foundKey)
{ BTreeNode_iv_t *iv = GetIVs(BTreeNode, self);
	int found, idx; 
	object ret; 

	found = bsearch2(iv, cfun, key, &idx); 
	if (iv->iType == 2) 
		if (idx != iv->iUsed) { 
		if (foundKey) 
			*foundKey = iv->iKeys[idx]; 
		return iv->iObjects[idx]; 
	} else { 
		if (foundKey) 
			*foundKey = NULL; 
		return NULL; 
	} 
	for (idx=idx+found ; idx <= iv->iUsed ; idx++) 
		if (ret = findGE(iv->iObjects[idx], cfun, key, foundKey)) 
		return ret; 
	return NULL; 
} 
Example #2
0
ref<set_member> CTimeBtree::FindFirst(time_t t) const
{
	return findGE((skey_t)t);
}