Пример #1
0
size_t multimap_size(const multimap_t* cpt_multimap)
{
    assert(cpt_multimap != NULL);

#ifdef CSTL_MULTIMAP_AVL_TREE
    return _avl_tree_size(_GET_MULTIMAP_AVL_TREE(cpt_multimap));
#else
    return _rb_tree_size(_GET_MULTIMAP_RB_TREE(cpt_multimap));
#endif
}
Пример #2
0
/**
 * Get the number of elements int the multiset.
 */
size_t multiset_size(const multiset_t* cpmset_mset)
{
    assert(cpmset_mset != NULL);

#ifdef CSTL_MULTISET_AVL_TREE
    return _avl_tree_size(&cpmset_mset->_t_tree);
#else
    return _rb_tree_size(&cpmset_mset->_t_tree);
#endif
}
Пример #3
0
/**
 * Get the number of elements int the set.
 */
size_t set_size(const set_t* cpset_set)
{
    assert(cpset_set != NULL);

#ifdef CSTL_SET_AVL_TREE
    return _avl_tree_size(&cpset_set->_t_tree);
#else
    return _rb_tree_size(&cpset_set->_t_tree);
#endif
}
Пример #4
0
/**
 * Get the number of elements int the map.
 */
size_t map_size(const map_t* cpmap_map)
{
    assert(cpmap_map != NULL);
    assert(_pair_is_inited(&cpmap_map->_pair_temp));

#ifdef CSTL_MAP_AVL_TREE
    return _avl_tree_size(&cpmap_map->_t_tree);
#else
    return _rb_tree_size(&cpmap_map->_t_tree);
#endif
}