コード例 #1
0
ファイル: cstl_multimap.c プロジェクト: Masshat/C_and_CPP
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
ファイル: cstl_multiset.c プロジェクト: cffyh/libcstl
/**
 * 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
ファイル: cstl_set.c プロジェクト: coderXing/libcstl
/**
 * 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
ファイル: cstl_map.c プロジェクト: astrotycoon/libcstl
/**
 * 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
}