/* * Delete an instance of the class passed and numbered on the input. */ void Escher_DeleteInstance( Escher_iHandle_t instance, const Escher_DomainNumber_t domain_num, const Escher_ClassNumber_t class_num ) { Escher_SetElement_s * node; Escher_Extent_t * dci = *(domain_class_info[ domain_num ] + class_num); node = Escher_SetRemoveNode( &dci->active, instance ); node->next = dci->inactive.head; dci->inactive.head = node; /* Initialize storage to zero. */ Escher_memset( instance, 0, dci->size ); }
/* * This interface is used more often to remove an element. This is * used when maximum anonymity is required. Escher_SetRemoveNode is * used when some knowledge of the linking mechanism is required (as * in extent management). */ void Escher_SetRemoveElement( Escher_ObjectSet_s * set, const void * const d ) { Escher_SetElement_s * t; if ( set->head != 0 ) { /* empty set */ t = Escher_SetRemoveNode( set, d ); /* Return node to architecture collection (free list). */ if ( t != 0 ) { t->next = node1_FreeList.head; node1_FreeList.head = t; } } }
/* * Delete an instance of the class passed and numbered on the input. */ void Escher_DeleteInstance( Escher_iHandle_t instance, const Escher_DomainNumber_t domain_num, const Escher_ClassNumber_t class_num ) { Escher_SetElement_s * node; Escher_Extent_t * dci = *(domain_class_info[ domain_num ] + class_num); if ( 0 != instance ) { node = Escher_SetRemoveNode( &dci->active, instance ); node->next = dci->inactive.head; dci->inactive.head = node; /* Initialize storage to zero. */ Escher_memset( instance, 0, dci->size ); if ( ( 0 != dci->size ) && ( 0 != dci->initial_state ) ) { instance->current_state = -1; /* 0xff max for error detection */ } } }