AGX Dynamics  2.37.3.2
agx::HashSet< agx::ref_ptr< KeyT >, HashT, AllocatorT > Class Template Reference

#include <HashSet.h>

+ Inheritance diagram for agx::HashSet< agx::ref_ptr< KeyT >, HashT, AllocatorT >:

Public Types

typedef Implementation::const_iterator const_iterator
 
typedef HashSetImplementation< agx::ref_ptr< KeyT >, HashT, AllocatorT > Implementation
 
typedef Implementation::iterator iterator
 
- Public Types inherited from agx::HashSetImplementation< agx::ref_ptr< KeyT >, HashT, AllocatorT >
typedef template_iterator< const HashSetImplementation< agx::ref_ptr< KeyT >, HashT, AllocatorT > > const_iterator
 
typedef const agx::ref_ptr< KeyT > * const_pointer
 
typedef const agx::ref_ptr< KeyT > & const_reference
 
typedef size_t difference_type
 
typedef template_iterator< HashSetImplementation< agx::ref_ptr< KeyT >, HashT, AllocatorT > > iterator
 Iterators. More...
 
typedef std::bidirectional_iterator_tag iterator_category
 
typedef agx::ref_ptr< KeyT > * pointer
 
typedef agx::ref_ptr< KeyT > & reference
 
typedef size_t size_type
 
typedef agx::ref_ptr< KeyT > value_type
 
- Public Types inherited from agx::Container
enum  ClearPolicy { SHRINK_BUFFER, SHRINK_BUFFER_AVERAGED, MAINTAIN_BUFFER }
 agxData::Values from this enumeration is passed to the subclasses' 'clear' method in order to control what should become of the container's memory. More...
 

Public Member Functions

 HashSet (const AllocatorT &allocator=AllocatorT())
 
bool contains (const KeyT *key) const
 
bool erase (const KeyT *key)
 
iterator find (const KeyT *key)
 
const_iterator find (const KeyT *key) const
 
- Public Member Functions inherited from agx::HashSetImplementation< agx::ref_ptr< KeyT >, HashT, AllocatorT >
 HashSetImplementation (const AllocatorT &allocator=AllocatorT())
 Constructor. More...
 
 HashSetImplementation (const HashSetImplementation< agx::ref_ptr< KeyT >, HashT, AllocatorT > &other)
 Copy constructor. More...
 
 ~HashSetImplementation ()
 Destructor. More...
 
AllocatorT & allocator ()
 
const AllocatorT & allocator () const
 
iterator begin ()
 Iterator to first element in hash set. More...
 
const_iterator begin () const
 
void clear (ClearPolicy policy=SHRINK_BUFFER_AVERAGED)
 Remove all elements. More...
 
bool contains (const agx::ref_ptr< KeyT > &key) const
 Boolean query to test existence of an element. More...
 
iterator end ()
 Iterator marking end of hash set. More...
 
const_iterator end () const
 
bool erase (const agx::ref_ptr< KeyT > &key)
 Erase an element from the hash set. More...
 
iterator erase (const iterator &it)
 Erase an element using an iterator. More...
 
iterator find (const agx::ref_ptr< KeyT > &key)
 Find an element. More...
 
const_iterator find (const agx::ref_ptr< KeyT > &key) const
 
insert_iterator insert (const agx::ref_ptr< KeyT > &key)
 Insert an element, overwriting if key already exists. More...
 
HashSetImplementation< agx::ref_ptr< KeyT >, HashT, AllocatorT > & operator= (const HashSetImplementation< agx::ref_ptr< KeyT >, HashT, AllocatorT > &other)
 Assignment operator. More...
 
agx::ref_ptr< KeyT > & operator[] (const agx::ref_ptr< KeyT > &key)
 Index operator for accessing elements in the hash, inserting it if not found. More...
 
const agx::ref_ptr< KeyT > & operator[] (const agx::ref_ptr< KeyT > &key) const
 
void purge (T purger)
 Purge the hash set. More...
 
void reserve (size_t size)
 Reserve capacity in the hash set. More...
 
- Public Member Functions inherited from agx::Container
size_t capacity () const
 Returns the size of the memory are used by the container to store its elements. More...
 
bool empty () const
 
void * ptr ()
 
const void * ptr () const
 
size_t size () const
 

Additional Inherited Members

- Protected Member Functions inherited from agx::HashSetImplementation< agx::ref_ptr< KeyT >, HashT, AllocatorT >
Bucket * buckets () const
 
bool eraseBucket (size_t index)
 
size_t findBucket (const T2 &key) const
 
size_t & numBuckets ()
 
size_t numBuckets () const
 
size_t & numFilled ()
 
size_t numFilled () const
 
void rebuild (size_t size)
 Rebuild, and optionally resize hash set. More...
 
- Protected Member Functions inherited from agx::Container
 Container ()
 
 Container (Container &&other)
 
 Container (const Container &other)
 
 ~Container ()
 
- Protected Attributes inherited from agx::Container
void * m_buffer
 
size_t m_capacity
 
size_t m_size
 

Detailed Description

template<typename KeyT, typename HashT, typename AllocatorT>
class agx::HashSet< agx::ref_ptr< KeyT >, HashT, AllocatorT >

Definition at line 679 of file HashSet.h.

Member Typedef Documentation

◆ const_iterator

template<typename KeyT , typename HashT , typename AllocatorT >
typedef Implementation::const_iterator agx::HashSet< agx::ref_ptr< KeyT >, HashT, AllocatorT >::const_iterator

Definition at line 684 of file HashSet.h.

◆ Implementation

template<typename KeyT , typename HashT , typename AllocatorT >
typedef HashSetImplementation<agx::ref_ptr<KeyT>, HashT, AllocatorT> agx::HashSet< agx::ref_ptr< KeyT >, HashT, AllocatorT >::Implementation

Definition at line 682 of file HashSet.h.

◆ iterator

template<typename KeyT , typename HashT , typename AllocatorT >
typedef Implementation::iterator agx::HashSet< agx::ref_ptr< KeyT >, HashT, AllocatorT >::iterator

Definition at line 683 of file HashSet.h.

Constructor & Destructor Documentation

◆ HashSet()

template<typename KeyT , typename HashT , typename AllocatorT >
agx::HashSet< agx::ref_ptr< KeyT >, HashT, AllocatorT >::HashSet ( const AllocatorT &  allocator = AllocatorT())
inline

Definition at line 686 of file HashSet.h.

Member Function Documentation

◆ contains()

template<typename KeyT , typename HashT , typename AllocatorT >
bool agx::HashSet< agx::ref_ptr< KeyT >, HashT, AllocatorT >::contains ( const KeyT *  key) const
inline

◆ erase()

template<typename KeyT , typename HashT , typename AllocatorT >
bool agx::HashSet< agx::ref_ptr< KeyT >, HashT, AllocatorT >::erase ( const KeyT *  key)
inline

◆ find() [1/2]

template<typename KeyT , typename HashT , typename AllocatorT >
iterator agx::HashSet< agx::ref_ptr< KeyT >, HashT, AllocatorT >::find ( const KeyT *  key)
inline

◆ find() [2/2]

template<typename KeyT , typename HashT , typename AllocatorT >
const_iterator agx::HashSet< agx::ref_ptr< KeyT >, HashT, AllocatorT >::find ( const KeyT *  key) const
inline

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