Public Types | Public Member Functions | List of all members
bstdset< _Key, _Compare, _Allocator > Class Template Reference

A Bentley supplied implementation std::set. More...

#include <bstdset.h>

Public Types

typedef _Key key_type
typedef _Key value_type
typedef _Compare key_compare
typedef _Compare value_compare
typedef _Allocator allocator_type
typedef __rep_type::reference reference
typedef __rep_type::const_reference const_reference
typedef __rep_type::const_iterator iterator
typedef __rep_type::const_iterator const_iterator
typedef __rep_type::size_type size_type
typedef __rep_type::difference_type difference_type
typedef __rep_type::pointer pointer
typedef __rep_type::const_pointer const_pointer

Public Member Functions

 bstdset (const key_compare &__cmp=key_compare(), const allocator_type &__alloc=allocator_type())
template<class _InputIter >
 bstdset (_InputIter __first, _InputIter __last, const key_compare &__cmp=key_compare(), const allocator_type &__al=allocator_type())
 bstdset (const bstdset &__x)
bstdsetoperator= (const bstdset &__x)
allocator_type get_allocator () const
iterator begin ()
const_iterator begin () const
iterator end ()
const_iterator end () const
reverse_iterator rbegin ()
const_reverse_iterator rbegin () const
reverse_iterator rend ()
const_reverse_iterator rend () const
bool empty () const
size_type size () const
size_type max_size () const
bpair< iterator, bool > insert (const value_type &__x)
iterator insert (iterator __it, const value_type &__x)
iterator erase (iterator __it)
void erase (iterator __first, iterator __last)
template<class _InputIter >
void insert (_InputIter __first, _InputIter __last)
size_type erase (const key_type &__x)
void swap (bstdset &__x)
void clear ()
key_compare key_comp () const
value_compare value_comp () const
iterator find (const key_type &__x)
const_iterator find (const key_type &__x) const
size_type count (const key_type &__x) const
iterator lower_bound (const key_type &__x)
const_iterator lower_bound (const key_type &__x) const
iterator upper_bound (const key_type &__x)
const_iterator upper_bound (const key_type &__x) const
bpair< iterator, iteratorequal_range (const key_type &__x)
bpair< const_iterator,
equal_range (const key_type &__x) const

Detailed Description

template<class _Key, class _Compare = std::less<_Key>, class _Allocator = ::Bentley::BentleyAllocator<_Key>>
class bstdset< _Key, _Compare, _Allocator >

A Bentley supplied implementation std::set.

This class is used in the Bentley APIs to avoid dependencies on compiler-supplied implementations of std::map that sometimes vary with compiler settings or compiler versions. The bstdset class does not suffer from these problems. This makes bstdset suitable for use in Bentley public APIs.

There is also another Bentley supplied implementation of std::set called bset. bset is generally the preferable std::set implementation for most use cases, but it is not a 100% compatible implementation of std::set (see discussion therein). If you cannot live with bset's restrictions, you should use bstdset.

To understand the bstdset class, consult the documentation for std::map.

See also

Member Typedef Documentation

typedef _Allocator allocator_type
typedef __rep_type::const_iterator const_iterator
typedef __rep_type::const_pointer const_pointer
typedef __rep_type::const_reference const_reference
typedef __rep_type::const_reverse_iterator const_reverse_iterator
typedef __rep_type::difference_type difference_type
typedef __rep_type::const_iterator iterator
typedef _Compare key_compare
typedef _Key key_type
typedef __rep_type::pointer pointer
typedef __rep_type::reference reference
typedef __rep_type::const_reverse_iterator reverse_iterator
typedef __rep_type::size_type size_type
typedef _Compare value_compare
typedef _Key value_type

Constructor & Destructor Documentation

bstdset ( const key_compare __cmp = key_compare (),
const allocator_type __alloc = allocator_type () 
bstdset ( _InputIter  __first,
_InputIter  __last,
const key_compare __cmp = key_compare (),
const allocator_type __al = allocator_type () 
bstdset ( const bstdset< _Key, _Compare, _Allocator > &  __x)

Member Function Documentation

iterator begin ( )

Referenced by operator==().

const_iterator begin ( ) const
void clear ( )
size_type count ( const key_type __x) const
bool empty ( ) const
iterator end ( )

Referenced by operator==().

const_iterator end ( ) const
bpair<iterator, iterator> equal_range ( const key_type __x)
bpair<const_iterator, const_iterator> equal_range ( const key_type __x) const
iterator erase ( iterator  __it)
void erase ( iterator  __first,
iterator  __last 
size_type erase ( const key_type __x)
iterator find ( const key_type __x)
const_iterator find ( const key_type __x) const
allocator_type get_allocator ( ) const
bpair<iterator, bool> insert ( const value_type __x)
iterator insert ( iterator  __it,
const value_type __x 
void insert ( _InputIter  __first,
_InputIter  __last 
key_compare key_comp ( ) const
iterator lower_bound ( const key_type __x)
const_iterator lower_bound ( const key_type __x) const
size_type max_size ( ) const
bstdset& operator= ( const bstdset< _Key, _Compare, _Allocator > &  __x)
reverse_iterator rbegin ( )
const_reverse_iterator rbegin ( ) const
reverse_iterator rend ( )
const_reverse_iterator rend ( ) const
size_type size ( ) const

Referenced by operator==().

void swap ( bstdset< _Key, _Compare, _Allocator > &  __x)

Referenced by swap().

iterator upper_bound ( const key_type __x)
const_iterator upper_bound ( const key_type __x) const
value_compare value_comp ( ) const

The documentation for this class was generated from the following file:

Copyright © 2017 Bentley Systems, Incorporated. All rights reserved.