Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
Essential Tools Module Reference Guide

RWTValHashMultiSet<T,H,EQ,A>

Module:  Essential Tools Module   Group:  STL Extension-based Collection


Does not inherit

Local Index

Members

Non-Members

Synopsis

#include <rw/tvhasht.h>
RWTValHashMultiSet<T,H,EQ,A>

Description

This class maintains a collection of values, which are stored according to a hash object of type H. H must offer a const hash function for elements of type T via public member

Objects within the collection will be grouped together based on an equality object of type EQ. EQ must ensure this grouping via public member

which should return TRUE if x and y are equivalent, FALSE otherwise.

Note: Any two keys that are equivalent must hash to the same value.

RWTValHashMultiSet<T,H,EQ,A> may contain multiple items that are equivalent to each other. (RWTValHashSet<T,H,EQ,A> will not accept an item that is equivalent to an item already in the collection.)

The value type must have operator==() defined. This requirement is imposed by the Standard C++ Library.

Persistence

Isomorphic

Example

Related Classes

Class RWTValHashSet<T,H,EQ,A> offers the same interface to a collection that will not accept multiple items that compare equal to each other.

Class rw_hashmultiset<T,H,EQ,A> is the C++-standard compliant collection that serves as the underlying implementation for RWTValHashMultiSet<T,H,EQ,A>.

Public Typedefs

typedef rw_hashmultiset<T,H,EQ,A> container_type; 
typedef typename container_type::iterator iterator;
typedef typename container_type::const_iterator
  const_iterator;
typedef typename container_type::size_type size_type;
typedef T value_type; 
typedef T& reference; 
typedef const T& const_reference; 

Public Constructors

RWTValHashMultiSet<T,H,EQ,A>(size_type sz = 1024,
     const H& h = H(),const EQ& eq = EQ());
RWTValHashMultiSet<T,H,EQ,A>
   (const rw_hashmultiset<T,H,EQ,A>& s);
RWTValHashMultiSet<T,H,EQ,A>
   (const RWTValHashMultiSet<T,H,EQ,A>&);
RWTValHashMultiSet<T,H,EQ,A>
   (const H& h,size_type sz = RWDEFAULT_CAPACITY);
RWTValHashMultiSet<T,H,EQ,A>(const T* first,
   const T* last,size_type sz = 1024,const H& h = H(),
   const EQ& eq = EQ());

Public Member Operators

RWTValHashMultiSet<T,H,EQ,A>&
operator=(const RWTValHashMultiSet<T,H,EQ,A>& s); 
RWTValHashMultiSet<T,H,EQ,A>&
operator=(const rw_hashmultiset<T,H,EQ,A>& s);
bool
operator==(const RWTValHashMultiSet<T,H,EQ,A>& s) const; 
bool
operator==(const rw_hashmultiset<T,H,EQ,A>& s) const;

Public Member Functions

void
apply(void (*fn)(const_reference,void*), void* d) const; 
iterator
begin();
const_iterator
begin() const;
size_type
capacity() const; 
void
clear();
bool
contains(const_reference a) const; 
bool
contains(bool (*fn)(const_reference,void*), void* d) const;
void
difference(const RWTValHashMultiSet<T,H,EQ,A>& s); 
iterator
end();
const_iterator
end() const;
size_type
entries() const; 
float
fillRatio() const; 
bool
find(const_reference a,T& k) const; 
bool
find(bool (*fn)(const_reference,void*),void* d,T& k) const; 
bool
insert(const_reference a); 
void
intersection(const RWTValHashMultiSet<T,H,EQ,A>& s); 
bool
isEmpty() const; 
bool
isEquivalent(const RWTValHashMultiSet<T,H,EQ,A>& s) const; 
bool
isProperSubsetOf(const RWTValHashMultiSet<T,H,EQ,A>& s) const;
bool
isSubsetOf(const RWTValHashMultiSet<T,H,EQ,A>& s) const; 
size_type
occurrencesOf(const_reference a) const; 
size_type
occurrencesOf(bool (*fn)(const_reference,void*),
              void* d) const;
bool
remove(const_reference a); 
bool
remove(bool (*fn)(const_reference,void*), void* d);
size_type
removeAll(const_reference a); 
size_type
removeAll(bool (*fn)(const_reference,void*), void* d);
void
resize(size_type sz); 
rw_hashmultiset<T,H,EQ,A>&
std();
const rw_hashmultiset<T,H,EQ,A>&
std() const;
void
symmetricDifference(const RWTValHashMultiSet<T,H,EQ,A>& s); 
void
Union(const RWTValHashMultiSet<T,H,EQ,A>& rhs); 

Related Global Operators

RWvostream&
operator<<(RWvostream& strm, 
       const RWTValHashMultiSet<T,H,EQ,A>& coll);
RWFile&
operator<<(RWFile& strm, 
       const RWTValHashMultiSet<T,H,EQ,A>& coll);
RWvistream&
operator>>(RWvistream& strm, 
           RWTValHashMultiSet<T,H,EQ,A>& coll); 
RWFile&
operator>>(RWFile& strm, RWTValHashMultiSet<T,H,EQ,A>& coll);
RWvistream&
operator>>(RWvistream& strm, 
           RWTValHashMultiSet<T,H,EQ,A>*& p);
RWFile&
operator>>(RWFile& strm, RWTValHashMultiSet<T,H,EQ,A>*& p);


Previous fileTop of DocumentContentsIndex pageNext file

©2004 Copyright Quovadx, Inc. All Rights Reserved.
Rogue Wave and SourcePro are registered trademarks of Quovadx, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.