obj_def ( Object : : : )

Test whether an object is already deleted.

The operator obj_def checks whether the object still exists in the HORUS data bank (i.e. whether the surrogate is still valid). This check especially makes sense before deleting an object if it cannot be excluded that the object has already been deleted by a prior deleting operator (clear).


Attention

The operator obj_def can return TRUE even if the object was already deleted because the surrogates of deleted objects are re-used for new objects. In this connection see the example.


Parameters

Object (input_object)
object -> object
Object to be checked.


Example
ERR_TYPE err;
circle(&Circle,100.0,100.0,100.0);
err = obj_def(Circle);
printf("Result for obj_def (MESS_TRUE): %d\",err);
clear(Circle);
err = obj_def(Circle);
printf("Result for obj_def (MESS_FALSE): %d\",err);
rectangle1(&Rectangle,200.0,200.0,300.0,300.0);
err = obj_def(Circle);
printf("Result for obj_def (MESS_TRUE!!!): %d\",err);

Complexity

The runtime complexity is O(1).


Result

The operator obj_def returns the value TRUE if an object with this surrogate is present in the HORUS data bank, otherwise the value FALSE is returned. The behavior in case of empty input (no input objects available) is set via the operator set_system(::'no_object_result',<Result>:).


Possible Predecessors

clear, circle, rectangle1


See also

set_check, clear, init_horus


Return Value

bool



Copyright © 1996-1997 MVTec Software GmbH