/* * Erase an element in an multiset from specificed position. */ void multiset_erase_pos(multiset_t* pmset_mset, multiset_iterator_t it_pos) { assert(pmset_mset != NULL); assert(_MULTISET_ITERATOR_CONTAINER_TYPE(it_pos) == _MULTISET_CONTAINER); assert(_MULTISET_ITERATOR_ITERATOR_TYPE(it_pos) == _BIDIRECTIONAL_ITERATOR); assert(_MULTISET_ITERATOR_CONTAINER(it_pos) == pmset_mset); #ifdef CSTL_MULTISET_AVL_TREE _avl_tree_erase_pos(&pmset_mset->_t_tree, it_pos); #else _rb_tree_erase_pos(&pmset_mset->_t_tree, it_pos); #endif }
/* * Erase an element in an set from specificed position. */ void set_erase_pos(set_t* pset_set, set_iterator_t t_pos) { assert(pset_set != NULL); assert(_SET_ITERATOR_CONTAINER_TYPE(t_pos) == _SET_CONTAINER); assert(_SET_ITERATOR_ITERATOR_TYPE(t_pos) == _BIDIRECTIONAL_ITERATOR); assert(_SET_ITERATOR_CONTAINER(t_pos) == pset_set); #ifdef CSTL_SET_AVL_TREE _avl_tree_erase_pos(&pset_set->_t_tree, t_pos); #else _rb_tree_erase_pos(&pset_set->_t_tree, t_pos); #endif }
void multimap_erase_pos(multimap_t* pt_multimap, multimap_iterator_t t_pos) { assert(pt_multimap != NULL); assert( _GET_MULTIMAP_CONTAINER_TYPE(&t_pos) == _MULTIMAP_CONTAINER && _GET_MULTIMAP_ITERATOR_TYPE(&t_pos) == _BIDIRECTIONAL_ITERATOR && _GET_MULTIMAP_CONTAINER(&t_pos) == pt_multimap); #ifdef CSTL_MULTIMAP_AVL_TREE _avl_tree_erase_pos(_GET_MULTIMAP_AVL_TREE(pt_multimap), t_pos); #else _rb_tree_erase_pos(_GET_MULTIMAP_RB_TREE(pt_multimap), t_pos); #endif }
/* * Erase an element in an map from specificed position. */ void map_erase_pos(map_t* pmap_map, map_iterator_t it_pos) { assert(pmap_map != NULL); assert(_pair_is_inited(&pmap_map->_pair_temp)); assert(_GET_MAP_CONTAINER_TYPE(it_pos) == _MAP_CONTAINER); assert(_GET_MAP_ITERATOR_TYPE(it_pos) == _BIDIRECTIONAL_ITERATOR); assert(_GET_MAP_CONTAINER(it_pos) == pmap_map); #ifdef CSTL_MAP_AVL_TREE _avl_tree_erase_pos(&pmap_map->_t_tree, it_pos); #else _rb_tree_erase_pos(&pmap_map->_t_tree, it_pos); #endif }